[PATCH] D52854: Use is.constant intrinsic for __builtin_constant_p

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 8 12:07:01 PDT 2018


efriedma added a comment.

I don't think that was the approach @rsmith was suggesting; you don't need to wrap every possible kind of expression.  Rather, at the point where the expression is required to be constant, add a single expression which wraps the entire expression tree to indicate that.  So for "constexpr int c = 10+2;", the expression tree for the initializer is something like ConstExpr(BinaryOperator(IntegerLiteral, IntegerLiteral)).


Repository:
  rC Clang

https://reviews.llvm.org/D52854





More information about the cfe-commits mailing list