shafik added a comment. Thank you, this looks good but perhaps some refactoring would help improve the change.
================ Comment at: lib/AST/ASTImporter.cpp:3243 + + if (R) { + CXXDestructorDecl *ToDtor = cast<CXXDestructorDecl>(*R); ---------------- a_sidorin wrote: > It's better to move this code to VisitFunctionDecl to keep all related stuff > together. I am not sure I agree. Having everything in `VisitFunctionDecl` makes this code harder to maintain. ================ Comment at: lib/AST/ASTImporter.cpp:3246 + + auto Imp = importSeq(const_cast<FunctionDecl *>(D->getOperatorDelete()), + D->getOperatorDeleteThisArg()); ---------------- a_sidorin wrote: > Moving this code to VisitFunctionDecl will also allow us not to create a dtor > if this import fails. At what point in `VisitFunctionDecl` would you expect this change to bail out of? A possible refactor would be to move this code to a separate function and then call that function at that point in `VisitFunctionDecl`. This would prevent `VisitFunctionDecl` from becoming even larger and I think address your concern. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56651/new/ https://reviews.llvm.org/D56651 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits