diff options
author | Nico Weber <nicolasweber@gmx.de> | 2012-01-23 05:50:57 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2012-01-23 05:50:57 +0000 |
commit | df1be86ef5f5d55fc23b2339ee76e076424d9ba0 (patch) | |
tree | 2265cadd8a2c62dedc251fa0ea428a2d16344ffb /test/SemaCXX/MicrosoftCompatibility.cpp | |
parent | 413c2c9d9c85ceb588e9cb965853f178a3a52bc9 (diff) |
In microsoft mode, downgrade pseudo-destructors on void from error to warning.
This matches cl.exe's behavior and fixes PR11791.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148682 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/MicrosoftCompatibility.cpp')
-rw-r--r-- | test/SemaCXX/MicrosoftCompatibility.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaCXX/MicrosoftCompatibility.cpp b/test/SemaCXX/MicrosoftCompatibility.cpp index 90a7ff731c..3634fa3462 100644 --- a/test/SemaCXX/MicrosoftCompatibility.cpp +++ b/test/SemaCXX/MicrosoftCompatibility.cpp @@ -163,3 +163,14 @@ enum ENUM2 { }; +namespace PR11791 { + template<class _Ty> + void del(_Ty *_Ptr) { + _Ptr->~_Ty(); // expected-warning {{pseudo-destructors on type void are a Microsoft extension}} + } + + void f() { + int* a = 0; + del((void*)a); // expected-note {{in instantiation of function template specialization}} + } +} |