From: Douglas Gregor Date: Mon, 14 Apr 2008 00:26:07 +0000 (+0000) Subject: Argiris Kirtzidis's fix for handling empty IdDeclInfo's in IdentifierResolver::AddDecl X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f8d9e76a58c2c6b00f925e347088ec9b5dc8f1b0;p=clang Argiris Kirtzidis's fix for handling empty IdDeclInfo's in IdentifierResolver::AddDecl git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49631 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/IdentifierResolver.cpp b/lib/Sema/IdentifierResolver.cpp index c062e80875..57e8d0a103 100644 --- a/lib/Sema/IdentifierResolver.cpp +++ b/lib/Sema/IdentifierResolver.cpp @@ -123,7 +123,7 @@ void IdentifierResolver::AddDecl(NamedDecl *D, Scope *S) { // 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(D)) { + if (isa(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)) {