[cfe-commits] r49631 - /cfe/trunk/lib/Sema/IdentifierResolver.cpp
Douglas Gregor
doug.gregor at gmail.com
Sun Apr 13 17:26:07 PDT 2008
Author: dgregor
Date: Sun Apr 13 19:26:07 2008
New Revision: 49631
URL: http://llvm.org/viewvc/llvm-project?rev=49631&view=rev
Log:
Argiris Kirtzidis's fix for handling empty IdDeclInfo's in IdentifierResolver::AddDecl
Modified:
cfe/trunk/lib/Sema/IdentifierResolver.cpp
Modified: cfe/trunk/lib/Sema/IdentifierResolver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/IdentifierResolver.cpp?rev=49631&r1=49630&r2=49631&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/IdentifierResolver.cpp (original)
+++ cfe/trunk/lib/Sema/IdentifierResolver.cpp Sun Apr 13 19:26:07 2008
@@ -123,7 +123,7 @@
// declarations shall all refer to the same object or
// enumerator, or all refer to functions and function templates;
// in this case the class name or enumeration name is hidden.
- if (isa<TagDecl>(D)) {
+ if (isa<TagDecl>(D) && IDI->shadowed_end() != IDI->shadowed_begin()) {
// We are pushing the name of a tag (enum or class).
IdDeclInfo::ShadowedIter TopIter = IDI->shadowed_end() - 1;
if (S->isDeclScope(*TopIter)) {
More information about the cfe-commits
mailing list