r194281 - Fix %select numbering confusion between diagnostic and Diag call.

Richard Smith richard-llvm at metafoo.co.uk
Fri Nov 8 13:51:24 PST 2013


Author: rsmith
Date: Fri Nov  8 15:51:24 2013
New Revision: 194281

URL: http://llvm.org/viewvc/llvm-project?rev=194281&view=rev
Log:
Fix %select numbering confusion between diagnostic and Diag call.

Modified:
    cfe/trunk/lib/Parse/ParseDeclCXX.cpp
    cfe/trunk/test/Parser/cxx-template-decl.cpp

Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=194281&r1=194280&r2=194281&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Fri Nov  8 15:51:24 2013
@@ -1249,7 +1249,7 @@ void Parser::ParseClassSpecifier(tok::To
         << (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);

Modified: cfe/trunk/test/Parser/cxx-template-decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/cxx-template-decl.cpp?rev=194281&r1=194280&r2=194281&view=diff
==============================================================================
--- cfe/trunk/test/Parser/cxx-template-decl.cpp (original)
+++ cfe/trunk/test/Parser/cxx-template-decl.cpp Fri Nov  8 15:51:24 2013
@@ -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 {





More information about the cfe-commits mailing list