]> granicus.if.org Git - clang/commitdiff
Fix %select numbering confusion between diagnostic and Diag call.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 8 Nov 2013 21:51:24 +0000 (21:51 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 8 Nov 2013 21:51:24 +0000 (21:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194281 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Parse/ParseDeclCXX.cpp
test/Parser/cxx-template-decl.cpp

index c0e17d7a5b6f26274c6bd4306d778e1fb762bf02..8cd16b3ee099872043c223fd796fb6e0a6a32cce 100644 (file)
@@ -1249,7 +1249,7 @@ void Parser::ParseClassSpecifier(tok::TokenKind TagTokKind,
         << (TemplateInfo.Kind == ParsedTemplateInfo::ExplicitInstantiation)
         << (TagType == DeclSpec::TST_class? 0
             : TagType == DeclSpec::TST_struct? 1
-            : TagType == DeclSpec::TST_interface? 2
+            : TagType == DeclSpec::TST_union? 2
             : 3)
         << Name
         << SourceRange(LAngleLoc, RAngleLoc);
index 7200c9d78f745704e4b0421429e6d6fb4d49ed36..7dcf482fd31c8b351d918ba7841ffdf080f3980f 100644 (file)
@@ -116,6 +116,7 @@ void f2() {
 
 // PR3844
 template <> struct S<int> { }; // expected-error{{explicit specialization of non-template struct 'S'}}
+template <> union U<int> { }; // expected-error{{explicit specialization of non-template union 'S'}}
 
 namespace PR6184 {
   namespace N {