diff options
Diffstat (limited to 'lib/Sema/IdentifierResolver.cpp')
-rw-r--r-- | lib/Sema/IdentifierResolver.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<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)) { |