[PATCH] some StmtExprs do not have side-effects

Richard Smith richard at metafoo.co.uk
Fri Jun 5 12:19:37 PDT 2015


LGTM


================
Comment at: lib/AST/Expr.cpp:2899-2900
@@ +2898,4 @@
+    void VisitExpr(const Expr *E) {
+      if (E->HasSideEffects(Context, IncludePossibleEffects))
+        HasSideEffects = true;
+    }
----------------
Maybe only call `E->HasSideEffect(...)` if `HasSideEffect` is `false`. There's no point doing more checking once we've already found a side-effect.

http://reviews.llvm.org/D10211

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list