[PATCH] D38843: [ASTImporter] Support importing CXXPseudoDestructorExpr

Peter Szecsi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 19 06:25:44 PDT 2017


szepet added inline comments.


================
Comment at: lib/AST/ASTImporter.cpp:5549
+  Expr *BaseE = Importer.Import(E->getBase());
+  if (!BaseE)
+    return nullptr;
----------------
xazax.hun wrote:
> Does `E->getBase()` guaranteed to return non-null? What happens when this node was constructed using EmptyShell? Shouldn't we check for that somehow? When can that happen?
The import process of ArraySubscriptExpr and UnaryOperator (and probably more other classes) are not prepared for this case as well. Not sure if this can be encountered in a complete AST.
However, I think a lazy evaluated && operator won't hurt the performance and at least we are going to be prepared for this case.


https://reviews.llvm.org/D38843





More information about the cfe-commits mailing list