[ASTImporter] Call to HandleNameConflict in VisitEnumDecl mistakeningly using Name...
authorShafik Yaghmour <syaghmour@apple.com>
Mon, 8 Apr 2019 20:50:21 +0000 (20:50 +0000)
committerShafik Yaghmour <syaghmour@apple.com>
Mon, 8 Apr 2019 20:50:21 +0000 (20:50 +0000)
commitd4263123abfc4876a1b722a1130dcf6aebff0580
treed36dba9fcd24124f376621c7e185cebe7442cde0
parentbf1417d7e4fd6c20e7babb45a4492e741a7b19b5
[ASTImporter] Call to HandleNameConflict in VisitEnumDecl mistakeningly using Name instead of SearchName

Summary:
https://reviews.llvm.org/D51633 added error handling to the ASTNodeImporter::VisitEnumDecl(...) 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 getTypedefNameForAnonDecl(...).

Differential Revision: https://reviews.llvm.org/D59665

llvm-svn: 357940
clang/lib/AST/ASTImporter.cpp