[PATCH] D59665: Call to HandleNameConflict in VisitEnumDecl mistakeningly using Name instead of SearchName
Shafik Yaghmour via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 25 14:34:58 PDT 2019
shafik marked an inline comment as done.
shafik added a comment.
@martong your idea does not work b/c default construction `DeclarationName()` treats it the same as being empty. So `if (!Name)` is still `true`.
================
Comment at: lib/AST/ASTImporter.cpp:2463
if (!ConflictingDecls.empty()) {
- Name = Importer.HandleNameConflict(Name, DC, IDNS,
+ Name = Importer.HandleNameConflict(SearchName, DC, IDNS,
ConflictingDecls.data(),
----------------
a_sidorin wrote:
> If I understand correctly, this will replace Name with SearchName causing an anonymous enum to be imported as a named a few lines below. It doesn't look like a correct behaviour to me.
This is correct because either `SearchName` is `Name` or it is the name of the typedef for the anonymous enum set via `ImportInto(SearchName, D->getTypedefNameForAnonDecl()->getDeclName())`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59665/new/
https://reviews.llvm.org/D59665
More information about the cfe-commits
mailing list