summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorShafik Yaghmour <syaghmour@apple.com>2019-05-24 16:53:44 +0000
committerShafik Yaghmour <syaghmour@apple.com>2019-05-24 16:53:44 +0000
commit424619da5abb9750e772e8ea8e15e9548c47d08c (patch)
treeaa39eefc574e2ed6b49d6251dfc9333831f23b17 /lib
parentee34ee5940da5de0b8f5563a9043ebdc172a1a06 (diff)
downloadclang-424619da5abb9750e772e8ea8e15e9548c47d08c.tar.gz
[ASTImporter] Call to HandleNameConflict in VisitRecordDecl mistakeningly using Name instead of SearchName
Summary: https://reviews.llvm.org/D51633 added error handling to the ASTNodeImporter::VisitRecordDecl for the conflicting names case. This could lead to erroneous return of an error in that case since we should have been using SearchName. Name may be empty in the case where we find the name via D->getTypedefNameForAnonDecl()->getDeclName(). This fix is very similar to https://reviews.llvm.org/D59665 Differential Revision: https://reviews.llvm.org/D62352 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361650 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/ASTImporter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/AST/ASTImporter.cpp b/lib/AST/ASTImporter.cpp
index 74a1887753..2b7470410f 100644
--- a/lib/AST/ASTImporter.cpp
+++ b/lib/AST/ASTImporter.cpp
@@ -2585,7 +2585,7 @@ ExpectedDecl ASTNodeImporter::VisitRecordDecl(RecordDecl *D) {
} // for
if (!ConflictingDecls.empty() && SearchName) {
- Name = Importer.HandleNameConflict(Name, DC, IDNS,
+ Name = Importer.HandleNameConflict(SearchName, DC, IDNS,
ConflictingDecls.data(),
ConflictingDecls.size());
if (!Name)