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 | da9740061b23f8b14256b8e4f15e118998f79144 (patch) | |
tree | 94a7f8ee984cda5f209a7eb5c88e6a73db9eb0b6 | |
parent | 35b7fe8c255e04754224a9865a3a346b7d40e765 (diff) | |
download | llvm-da9740061b23f8b14256b8e4f15e118998f79144.zip llvm-da9740061b23f8b14256b8e4f15e118998f79144.tar.gz llvm-da9740061b23f8b14256b8e4f15e118998f79144.tar.bz2 |
Fix the ASTImporter's lookup for anonymous structs/unions that get a
linkage name via typedef. Patch from/fixes PR10958.
llvm-svn: 140317
-rw-r--r-- | clang/lib/AST/ASTImporter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/AST/ASTImporter.cpp b/clang/lib/AST/ASTImporter.cpp index 1a2e02f..c791ba1 100644 --- a/clang/lib/AST/ASTImporter.cpp +++ b/clang/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)) |