aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-05-18 18:46:22 +0000
committerDouglas Gregor <dgregor@apple.com>2009-05-18 18:46:22 +0000
commit52b2fe2d70d83f73ee59e9ad3d0ba8ac154acfda (patch)
treeb403375e0ef6b9af201e67b0fcbf6d39b5eefcf1
parente4cf06dd4997874a29424de60f02ff7a7b532b79 (diff)
Simplify struct/class tag mismatch warning, per Sebastian's suggestion
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72027 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td2
-rw-r--r--lib/Sema/SemaDecl.cpp1
2 files changed, 1 insertions, 2 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index d62dc487c4..f31212e540 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -835,7 +835,7 @@ def err_use_with_wrong_tag : Error<
"use of %0 with tag type that does not match previous declaration">;
def warn_struct_class_tag_mismatch : Warning<
"%select{struct|class}0 %select{|template}1 %2 was previously declared "
- "as a %select{struct|class}3 %select{|template}1">,
+ "as a %select{class|struct}0 %select{|template}1">,
InGroup<MismatchedTags>, DefaultIgnore;
def ext_forward_ref_enum : Extension<
"ISO C forbids forward references to 'enum' types">;
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 92344d30d3..ceb5822433 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -3300,7 +3300,6 @@ bool Sema::isAcceptableTagRedeclaration(const TagDecl *Previous,
Diag(NewTagLoc, diag::warn_struct_class_tag_mismatch)
<< (NewTag == TagDecl::TK_class)
<< isTemplate << &Name
- << (OldTag == TagDecl::TK_class)
<< CodeModificationHint::CreateReplacement(SourceRange(NewTagLoc),
OldTag == TagDecl::TK_class? "class" : "struct");
Diag(Previous->getLocation(), diag::note_previous_use);