[PATCH] D59692: [ASTImporter] Fix name conflict handling

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 2 02:11:43 PDT 2019


martong marked 2 inline comments as done.
martong added inline comments.


================
Comment at: lib/AST/ASTImporter.cpp:2154
+        return NameOrErr.takeError();
     }
   }
----------------
a_sidorin wrote:
> Should we write `else Name = *NameOrError`?
Atm, we implement the simplest strategy for name conflict handling: we just return with the error.
However, on a long term we should use the returned name indeed. I mean when we really do implement a renaming strategy via `HandleNameConflict`. 

Also, for that we'd have to double check that the `Name` is indeed used when we create the AST node. So I'd rather leave this `else` branch up to that point. Hopefully, by that time we'll have unittests which would exercise this `else` branch, now we just don't have any.



Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59692/new/

https://reviews.llvm.org/D59692





More information about the cfe-commits mailing list