]> granicus.if.org Git - clang/commit
[ASTImporter] Call to HandleNameConflict in VisitRecordDecl mistakeningly using Name...
authorShafik Yaghmour <syaghmour@apple.com>
Fri, 24 May 2019 16:53:44 +0000 (16:53 +0000)
committerShafik Yaghmour <syaghmour@apple.com>
Fri, 24 May 2019 16:53:44 +0000 (16:53 +0000)
commit424619da5abb9750e772e8ea8e15e9548c47d08c
treeaa39eefc574e2ed6b49d6251dfc9333831f23b17
parentee34ee5940da5de0b8f5563a9043ebdc172a1a06
[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
lib/AST/ASTImporter.cpp