From 0464e09c7ba8e436e6caed06b0377cdeddc3e3ec Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Fri, 8 Nov 2013 21:51:24 +0000 Subject: [PATCH] Fix %select numbering confusion between diagnostic and Diag call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194281 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Parse/ParseDeclCXX.cpp | 2 +- test/Parser/cxx-template-decl.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp index c0e17d7a5b..8cd16b3ee0 100644 --- a/lib/Parse/ParseDeclCXX.cpp +++ b/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/test/Parser/cxx-template-decl.cpp b/test/Parser/cxx-template-decl.cpp index 7200c9d78f..7dcf482fd3 100644 --- a/test/Parser/cxx-template-decl.cpp +++ b/test/Parser/cxx-template-decl.cpp @@ -116,6 +116,7 @@ void f2() { // PR3844 template <> struct S { }; // expected-error{{explicit specialization of non-template struct 'S'}} +template <> union U { }; // expected-error{{explicit specialization of non-template union 'S'}} namespace PR6184 { namespace N { -- 2.40.0