diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-03-13 23:33:06 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-03-13 23:33:06 +0000 |
commit | e7591c511831aa66afe06902a408647535da6a4d (patch) | |
tree | f7e75db49cd79e37be336f68dd3d0edb70af955c | |
parent | 6cc0969ab37c614d6cf496f2ed6d2fca397a0133 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152681 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/SemaCXX/PR8385.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/SemaCXX/PR8385.cpp b/test/SemaCXX/PR8385.cpp new file mode 100644 index 0000000000..77a117a007 --- /dev/null +++ b/test/SemaCXX/PR8385.cpp @@ -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{ |