summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-11-08 21:51:24 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-11-08 21:51:24 +0000
commit68b1453ce02d61ee24900903d441cd0057c17c0f (patch)
tree673f40f21104af4d5dbc99a73ee9048361b53b05
parent5eb9bfc863a8d3ef4c8d723baf4bbac544063460 (diff)
downloadbcm5719-llvm-68b1453ce02d61ee24900903d441cd0057c17c0f.tar.gz
bcm5719-llvm-68b1453ce02d61ee24900903d441cd0057c17c0f.zip
Fix %select numbering confusion between diagnostic and Diag call.
llvm-svn: 194281
-rw-r--r--clang/lib/Parse/ParseDeclCXX.cpp2
-rw-r--r--clang/test/Parser/cxx-template-decl.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp
index c0e17d7a5b6..8cd16b3ee09 100644
--- a/clang/lib/Parse/ParseDeclCXX.cpp
+++ b/clang/lib/Parse/ParseDeclCXX.cpp
@@ -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);
diff --git a/clang/test/Parser/cxx-template-decl.cpp b/clang/test/Parser/cxx-template-decl.cpp
index 7200c9d78f7..7dcf482fd31 100644
--- a/clang/test/Parser/cxx-template-decl.cpp
+++ b/clang/test/Parser/cxx-template-decl.cpp
@@ -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 {
OpenPOWER on IntegriCloud