shafik created this revision.
shafik added reviewers: teemperor, martong, a_sidorin.
Herald added a subscriber: rnkovacs.
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(...)`.
https://reviews.llvm.org/D59665
Files:
lib/AST/ASTImporter.cpp
Index: lib/AST/ASTImporter.cpp
===================================================================
--- lib/AST/ASTImporter.cpp
+++ lib/AST/ASTImporter.cpp
@@ -2460,7 +2460,7 @@
}
if (!ConflictingDecls.empty()) {
- Name = Importer.HandleNameConflict(Name, DC, IDNS,
+ Name = Importer.HandleNameConflict(SearchName, DC, IDNS,
ConflictingDecls.data(),
ConflictingDecls.size());
if (!Name)
Index: lib/AST/ASTImporter.cpp
===================================================================
--- lib/AST/ASTImporter.cpp
+++ lib/AST/ASTImporter.cpp
@@ -2460,7 +2460,7 @@
}
if (!ConflictingDecls.empty()) {
- Name = Importer.HandleNameConflict(Name, DC, IDNS,
+ Name = Importer.HandleNameConflict(SearchName, DC, IDNS,
ConflictingDecls.data(),
ConflictingDecls.size());
if (!Name)
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits