[PATCH] D53818: [ASTImporter] Changed use of Import to Import_New in ASTImporter.

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 15 00:48:22 PST 2018


balazske marked 3 inline comments as done.
balazske added a comment.

If we change signature of `Import` now, other parts of the code (in clang and LLDB) would not compile (without changing to use the new kind of Import). If there is a `Import_New` the old code can still compile and can be changed later.



================
Comment at: lib/AST/ASTImporter.cpp:7889
+    return NestedNameSpecifier::Create(ToContext, Prefix,
+                                       Import(FromNNS->getAsIdentifier()));
 
----------------
a_sidorin wrote:
> We can use Import_New if we change this code, like it is done below.
For `IdentifierInfo` there is no Import_New because this is the one kind of import that can not fail, it remains the same Import as before (does not return `Expected`).


Repository:
  rC Clang

https://reviews.llvm.org/D53818





More information about the cfe-commits mailing list