diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-09-22 17:51:56 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-09-22 17:51:56 +0000 |
commit | 3340e27fe15c52fe28fc722a98fd55d796c90442 (patch) | |
tree | 8e809c82becf11992ce66793c2d78e647a107b56 | |
parent | af130823cbac5c02f7fe57a5733ee511f5a3ac98 (diff) |
Fix the ASTImporter's lookup for anonymous structs/unions that get a
linkage name via typedef. Patch from/fixes PR10958.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140317 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/AST/ASTImporter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/AST/ASTImporter.cpp b/lib/AST/ASTImporter.cpp index 1a2e02fe18..c791ba1a58 100644 --- a/lib/AST/ASTImporter.cpp +++ b/lib/AST/ASTImporter.cpp @@ -2178,7 +2178,7 @@ Decl *ASTNodeImporter::VisitEnumDecl(EnumDecl *D) { // We may already have an enum of the same name; try to find and match it. if (!DC->isFunctionOrMethod() && SearchName) { SmallVector<NamedDecl *, 4> ConflictingDecls; - for (DeclContext::lookup_result Lookup = DC->lookup(Name); + for (DeclContext::lookup_result Lookup = DC->lookup(SearchName); Lookup.first != Lookup.second; ++Lookup.first) { if (!(*Lookup.first)->isInIdentifierNamespace(IDNS)) @@ -2264,7 +2264,7 @@ Decl *ASTNodeImporter::VisitRecordDecl(RecordDecl *D) { RecordDecl *AdoptDecl = 0; if (!DC->isFunctionOrMethod() && SearchName) { SmallVector<NamedDecl *, 4> ConflictingDecls; - for (DeclContext::lookup_result Lookup = DC->lookup(Name); + for (DeclContext::lookup_result Lookup = DC->lookup(SearchName); Lookup.first != Lookup.second; ++Lookup.first) { if (!(*Lookup.first)->isInIdentifierNamespace(IDNS)) |