[PATCH] D56651: [ASTImporter] Fix importing OperatorDelete from CXXConstructorDecl

Aleksei Sidorin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 13 15:19:48 PST 2019


a_sidorin added a comment.

Hi Rafael,
The change  looks mostly fine but I have some comments inline.



================
Comment at: lib/AST/ASTImporter.cpp:3243
+
+  if (R) {
+    CXXDestructorDecl *ToDtor = cast<CXXDestructorDecl>(*R);
----------------
It's better to move this code to VisitFunctionDecl to keep all related stuff together.


================
Comment at: lib/AST/ASTImporter.cpp:3246
+
+    auto Imp = importSeq(const_cast<FunctionDecl *>(D->getOperatorDelete()),
+                         D->getOperatorDeleteThisArg());
----------------
Moving this code to VisitFunctionDecl will also allow us not to create a dtor if this import fails.


Repository:
  rC Clang

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

https://reviews.llvm.org/D56651





More information about the cfe-commits mailing list