[cfe-commits] r72027 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp
Douglas Gregor
dgregor at apple.com
Mon May 18 11:46:25 PDT 2009
Author: dgregor
Date: Mon May 18 13:46:22 2009
New Revision: 72027
URL: http://llvm.org/viewvc/llvm-project?rev=72027&view=rev
Log:
Simplify struct/class tag mismatch warning, per Sebastian's suggestion
Modified:
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/lib/Sema/SemaDecl.cpp
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=72027&r1=72026&r2=72027&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Mon May 18 13:46:22 2009
@@ -835,7 +835,7 @@
"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">;
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=72027&r1=72026&r2=72027&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Mon May 18 13:46:22 2009
@@ -3300,7 +3300,6 @@
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);
More information about the cfe-commits
mailing list