[PATCH] D59665: Call to HandleNameConflict in VisitEnumDecl mistakeningly using Name instead of SearchName
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 26 04:59:56 PDT 2019
martong added inline comments.
================
Comment at: lib/AST/ASTImporter.cpp:2463
if (!ConflictingDecls.empty()) {
- Name = Importer.HandleNameConflict(Name, DC, IDNS,
+ Name = Importer.HandleNameConflict(SearchName, DC, IDNS,
ConflictingDecls.data(),
----------------
shafik wrote:
> 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())`
Okay, this is indeed correct. But then we should make a similar change in VisitRecordDecl too (there we do exactly the same with typedefs).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59665/new/
https://reviews.llvm.org/D59665
More information about the cfe-commits
mailing list