rsmith added inline comments.

================
Comment at: clang/lib/Sema/SemaStmtAttr.cpp:178
+    return true;
+  return llvm::any_of(S->children(), hasCallExpr);
+}
----------------
zequanwu wrote:
> rsmith wrote:
> > This will recurse into too much (eg, the bodies of lambdas and blocks, and 
> > unevaluated operands). It would be better to make this a 
> > `ConstEvaluatedExprVisitor` instead (see 
> > include/clang/AST/EvaluatedExprVisitor.h).
> Do you mean to create a subclass of `ConstEvaluatedExprVisitor` to find if 
> the statement has call expression?
This is still recursing into unevaluated operands (eg. the operand of 
`sizeof`). Please use `ConstEvaluatedExprVisitor` instead of `ConstStmtVisitor`.


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

https://reviews.llvm.org/D79121



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

Reply via email to