diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-03-21 10:50:08 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-03-21 10:50:08 +0000 |
commit | 1e255aab650a7fa2047fd953cae65b12215280af (patch) | |
tree | 508d4388db78f87d35bf26a0400b4b03bc4c1f13 /test/SemaCXX/class.cpp | |
parent | 1033b7c1e32962948b01a25145829f17bc70a8de (diff) | |
download | FreeBSD-src-1e255aab650a7fa2047fd953cae65b12215280af.zip FreeBSD-src-1e255aab650a7fa2047fd953cae65b12215280af.tar.gz |
Update clang to r99115.
Diffstat (limited to 'test/SemaCXX/class.cpp')
-rw-r--r-- | test/SemaCXX/class.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/SemaCXX/class.cpp b/test/SemaCXX/class.cpp index 743983c..508ca4d 100644 --- a/test/SemaCXX/class.cpp +++ b/test/SemaCXX/class.cpp @@ -118,3 +118,21 @@ struct S void S::f() {} // expected-error {{class member cannot be redeclared}} expected-note {{previous declaration}} expected-note {{previous definition}} void f() {} // expected-error {{class member cannot be redeclared}} expected-error {{redefinition}} }; + +// Don't crash on this bogus code. +namespace pr6629 { + // TODO: most of these errors are spurious + template<class T1, class T2> struct foo : + bogus<foo<T1,T2> > // expected-error {{unknown template name 'bogus'}} \ + // BOGUS expected-error {{expected '{' after base class list}} \ + // BOGUS expected-error {{expected ';' after struct}} \ + // BOGUS expected-error {{expected unqualified-id}} \ + { }; + + template<> struct foo<unknown,unknown> { // why isn't there an error here? + template <typename U1, typename U2> struct bar { + typedef bar type; + static const int value = 0; + }; + }; +} |