summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/destructor.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2014-01-13 19:48:13 +0000
committerHans Wennborg <hans@hanshq.net>2014-01-13 19:48:13 +0000
commit9125b08b523524581280896d66a010517b2d1d28 (patch)
tree9c783a66e328c8a38eed6c94adf721cdffe57fea /clang/test/SemaCXX/destructor.cpp
parent4f017ceedae8245e11ad803f5698ec8afeb8f446 (diff)
downloadbcm5719-llvm-9125b08b523524581280896d66a010517b2d1d28.tar.gz
bcm5719-llvm-9125b08b523524581280896d66a010517b2d1d28.zip
Update tests in preparation for using the MS ABI for Win32 targets
In preparation for making the Win32 triple imply MS ABI mode, make all tests pass in this mode, or make them use the Itanium mode explicitly. Differential Revision: http://llvm-reviews.chandlerc.com/D2401 llvm-svn: 199130
Diffstat (limited to 'clang/test/SemaCXX/destructor.cpp')
-rw-r--r--clang/test/SemaCXX/destructor.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/destructor.cpp b/clang/test/SemaCXX/destructor.cpp
index e511be01166..bd22ff640d8 100644
--- a/clang/test/SemaCXX/destructor.cpp
+++ b/clang/test/SemaCXX/destructor.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -std=c++11 -fsyntax-only -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -verify %s
+// RUN: %clang_cc1 -std=c++11 -cxx-abi itanium -fsyntax-only -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -verify %s
+// RUN: %clang_cc1 -std=c++11 -cxx-abi microsoft -DMSABI -fsyntax-only -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -verify %s
class A {
public:
~A();
@@ -83,6 +84,12 @@ namespace PR6421 {
}
namespace PR6709 {
+#ifdef MSABI
+ // This bug, "Clang instantiates destructor for function argument" is intended
+ // behaviour in the Microsoft ABI because the callee needs to destruct the arguments.
+ // expected-error@+3 {{indirection requires pointer operand ('int' invalid)}}
+ // expected-note@+3 {{in instantiation of member function 'PR6709::X<int>::~X' requested here}}
+#endif
template<class T> class X { T v; ~X() { ++*v; } };
void a(X<int> x) {}
}
@@ -100,10 +107,16 @@ namespace test6 {
T::deleteIt(p); // expected-error {{type 'int' cannot be used prior to '::'}}
}
+#ifdef MSABI
+ // expected-note@+2 {{in instantiation of member function 'test6::A<int>::operator delete' requested here}}
+#endif
virtual ~A() {}
};
- class B : A<int> { B(); }; // expected-note {{in instantiation of member function 'test6::A<int>::operator delete' requested here}}
+#ifndef MSABI
+ // expected-note@+2 {{in instantiation of member function 'test6::A<int>::operator delete' requested here}}
+#endif
+ class B : A<int> { B(); };
B::B() {}
}
OpenPOWER on IntegriCloud