martong added inline comments.
Herald added a subscriber: rnkovacs.

================
Comment at: clang/lib/AST/ASTImporter.cpp:7004
+  // FIXME: Should ManglingNumber get numbers associated with 'to' context?
+  auto* To = MaterializeTemporaryDecl::Create(Temporary, ExtendingDecl,
+                                          D->getManglingNumber());
----------------
Could you please use `GetImportedOrCreateDecl<MaterializeTemporaryDecl>(...)` 
instead? We wrap every Decl creation in the ASTImporter so things that must be 
done right after creating a node is handled in one place.
Also, you can remove the next statement with `MapImported`.



================
Comment at: clang/lib/AST/ASTImporter.cpp:7021
   Expr *ToTemporaryExpr;
-  const ValueDecl *ToExtendingDecl;
-  std::tie(ToType, ToTemporaryExpr, ToExtendingDecl) = *Imp;
+  MaterializeTemporaryDecl *MaterialzedDecl;
+  std::tie(ToType, ToTemporaryExpr, MaterialzedDecl) = *Imp;
----------------
(An `i` is missing in `MaterialzedDecl`) And for consistency with the previous 
lines, perhaps it should be called as `ToMaterializedDecl`.


Repository:
  rC Clang

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

https://reviews.llvm.org/D69360



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to