diff options
Diffstat (limited to 'clang/test/SemaCXX/MicrosoftExtensions.cpp')
-rw-r--r-- | clang/test/SemaCXX/MicrosoftExtensions.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/MicrosoftExtensions.cpp b/clang/test/SemaCXX/MicrosoftExtensions.cpp index 38949e11376..c605dcb912f 100644 --- a/clang/test/SemaCXX/MicrosoftExtensions.cpp +++ b/clang/test/SemaCXX/MicrosoftExtensions.cpp @@ -504,6 +504,20 @@ struct S { int S::fn() { return 0; } // expected-warning {{is missing exception specification}} } +class PR34109_class { + PR34109_class() {} + virtual ~PR34109_class() {} +}; + +void operator delete(void *) throw(); +// expected-note@-1 {{previous declaration is here}} +__declspec(dllexport) void operator delete(void *) throw(); +// expected-error@-1 {{redeclaration of 'operator delete' cannot add 'dllexport' attribute}} + +void PR34109(int* a) { + delete a; +} + #elif TEST2 // Check that __unaligned is not recognized if MS extensions are not enabled |