r197410 - Revert "Maybe add new warning for shadowing simple tag types"
Kaelyn Uhrain
rikka at google.com
Mon Dec 16 11:25:47 PST 2013
Author: rikka
Date: Mon Dec 16 13:25:47 2013
New Revision: 197410
URL: http://llvm.org/viewvc/llvm-project?rev=197410&view=rev
Log:
Revert "Maybe add new warning for shadowing simple tag types"
This reverts commit 2b43f500cfea10a8c59c986dcfc24fd08eecc77d.
This was accidentally committed because I failed to notice my client
wasn't clean prior to submitting a fix for a crasher.
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=197410&r1=197409&r2=197410&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Mon Dec 16 13:25:47 2013
@@ -3662,10 +3662,6 @@ def err_redefinition_different_type : Er
"redefinition of %0 with a different type%diff{: $ vs $|}1,2">;
def err_redefinition_different_kind : Error<
"redefinition of %0 as different kind of symbol">;
-def warn_declaration_shadows_tag_type : Warning<
- "declaration of %0 shadows %1 %0; '%1' tag will be needed to refer to the %1">,
- InGroup<Shadow>, DefaultIgnore;
-def note_shadowed_tag_type_declaration : Note<"%1 %0 declared here">;
def warn_forward_class_redefinition : Warning<
"redefinition of forward class %0 of a typedef name of an object type is ignored">,
InGroup<DiagGroup<"objc-forward-class-redefinition">>;
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=197410&r1=197409&r2=197410&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Mon Dec 16 13:25:47 2013
@@ -4398,14 +4398,8 @@ NamedDecl *Sema::HandleDeclarator(Scope
// tag type. Note that this does does not apply if we're declaring a
// typedef (C++ [dcl.typedef]p4).
if (Previous.isSingleTagDecl() &&
- D.getDeclSpec().getStorageClassSpec() != DeclSpec::SCS_typedef) {
- TagDecl *TD = Previous.getAsSingle<TagDecl>();
- Diag(D.getIdentifierLoc(), diag::warn_declaration_shadows_tag_type)
- << Name << TD->getKindName();
- Diag(TD->getLocation(), diag::note_shadowed_tag_type_declaration)
- << Name << TD->getKindName();
+ D.getDeclSpec().getStorageClassSpec() != DeclSpec::SCS_typedef)
Previous.clear();
- }
// Check that there are no default arguments other than in the parameters
// of a function declaration (C++ only).
More information about the cfe-commits
mailing list