r175996 - Add the testcase from PR13573, this used to crash.

Benjamin Kramer benny.kra at googlemail.com
Sun Feb 24 07:51:32 PST 2013


Author: d0k
Date: Sun Feb 24 09:51:32 2013
New Revision: 175996

URL: http://llvm.org/viewvc/llvm-project?rev=175996&view=rev
Log:
Add the testcase from PR13573, this used to crash.

The error is a bit strange tbh, but better than crashing.

Modified:
    cfe/trunk/test/SemaCXX/cxx0x-defaulted-functions.cpp

Modified: cfe/trunk/test/SemaCXX/cxx0x-defaulted-functions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/cxx0x-defaulted-functions.cpp?rev=175996&r1=175995&r2=175996&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/cxx0x-defaulted-functions.cpp (original)
+++ cfe/trunk/test/SemaCXX/cxx0x-defaulted-functions.cpp Sun Feb 24 09:51:32 2013
@@ -170,3 +170,8 @@ namespace PR14577 {
   template<typename T>
   Outer<T>::Inner2<T>::~Inner2() = default; // expected-error {{nested name specifier 'Outer<T>::Inner2<T>::' for declaration does not refer into a class, class template or class template partial specialization}}  expected-error {{only special member functions may be defaulted}}
 }
+
+extern "C" {
+ template<typename _Tp> // expected-error {{templates must have C++ linkage}}
+ void PR13573(const _Tp&) = delete; // expected-error {{only functions can have deleted definitions}}
+}





More information about the cfe-commits mailing list