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



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

Reply via email to