1 // RUN: %clang_cc1 -std=c++11 -fexceptions -fcxx-exceptions -fsyntax-only -verify %s 2 3 // Deallocation functions are implicitly noexcept. 4 // Thus, explicit specs aren't allowed to conflict. 5 6 void f() { 7 // Force implicit declaration of delete. 8 delete new int; 9 delete[] new int[1]; 10 } 11 12 void operator delete(void*) noexcept; 13 void operator delete[](void*) noexcept; 14 15 // Same goes for explicit declarations. 16 void operator delete(void*, float); 17 void operator delete(void*, float) noexcept; 18 19 void operator delete[](void*, float); 20 void operator delete[](void*, float) noexcept; 21 22 // But explicit specs stay. 23 void operator delete(void*, double) throw(int); // expected-note {{previous}} 24 void operator delete(void*, double) noexcept; // expected-error {{does not match}} 25