r226370 - Add a test for something that used to crash before r226365.

Nico Weber nicolasweber at gmx.de
Fri Jan 16 20:14:31 PST 2015


Author: nico
Date: Fri Jan 16 22:14:31 2015
New Revision: 226370

URL: http://llvm.org/viewvc/llvm-project?rev=226370&view=rev
Log:
Add a test for something that used to crash before r226365.

Modified:
    cfe/trunk/test/SemaCXX/cxx0x-cursory-default-delete.cpp

Modified: cfe/trunk/test/SemaCXX/cxx0x-cursory-default-delete.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/cxx0x-cursory-default-delete.cpp?rev=226370&r1=226369&r2=226370&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/cxx0x-cursory-default-delete.cpp (original)
+++ cfe/trunk/test/SemaCXX/cxx0x-cursory-default-delete.cpp Fri Jan 16 22:14:31 2015
@@ -42,6 +42,16 @@ struct bad_decls {
   bad_decls& operator = (const bad_decls&) const = default; // expected-error {{may not have 'const', 'constexpr' or 'volatile' qualifiers}}
 };
 
+struct DefaultDelete {
+  DefaultDelete() = default; // expected-note {{previous declaration is here}}
+  DefaultDelete() = delete; // expected-error {{constructor cannot be redeclared}}
+};
+
+struct DeleteDefault {
+  DeleteDefault() = delete; // expected-note {{previous definition is here}}
+  DeleteDefault() = default; // expected-error {{constructor cannot be redeclared}}
+};
+
 struct A {}; struct B {};
 
 struct except_spec_a {





More information about the cfe-commits mailing list