[cfe-commits] r152681 - /cfe/trunk/test/SemaCXX/PR8385.cpp

David Blaikie dblaikie at gmail.com
Tue Mar 13 16:33:06 PDT 2012


Author: dblaikie
Date: Tue Mar 13 18:33:06 2012
New Revision: 152681

URL: http://llvm.org/viewvc/llvm-project?rev=152681&view=rev
Log:
Add a test case for PR8385.

"struct{template struct{" would fail an assertion.

This assertion failure seems to have gone away somewhere along the line so
here's a test to make sure we don't regress. We still accept some very weird
explicit template 'instantiations' ("template int;", anyone) but at least we're
not asserting/crashing here.

Added:
    cfe/trunk/test/SemaCXX/PR8385.cpp

Added: cfe/trunk/test/SemaCXX/PR8385.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/PR8385.cpp?rev=152681&view=auto
==============================================================================
--- cfe/trunk/test/SemaCXX/PR8385.cpp (added)
+++ cfe/trunk/test/SemaCXX/PR8385.cpp Tue Mar 13 18:33:06 2012
@@ -0,0 +1,7 @@
+// RUN: not %clang_cc1 -fsyntax-only %s
+
+// don't crash on this, but don't constrain our diagnostics here as they're
+// currently rather poor (we even accept things like "template struct {}").
+// Other, explicit tests, should verify the relevant behavior of template 
+// instantiation.
+struct{template struct{





More information about the cfe-commits mailing list