[PATCH] D47632: [ASTImporter] Refactor Decl creation

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 8 23:39:09 PDT 2018

balazske added inline comments.

Comment at: lib/AST/ASTImporter.cpp:6905
     Decl *ToD = Pos->second;
+    // FIXME: remove this call from this function
     ASTNodeImporter(*this).ImportDefinitionIfNeeded(FromD, ToD);
I think this comment is not needed (or with other text). There is a case when `GetAlreadyImportedOrNull` is called during import of a Decl that is already imported but its definition is not yet completely imported. If this call is here we have after `GetAlreadyImportedOrNull` a Decl with complete definition. (Name of the function is still bad: It does not only "get" but makes update too. The `ImportDefinitionIfNeeded` call can be moved into the decl create function?)

  rC Clang


More information about the cfe-commits mailing list