[PATCH] D55853: Ignore ConstantExpr in IgnoreParenNoopCasts
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 18 16:48:17 PST 2018
rsmith added inline comments.
================
Comment at: clang/lib/AST/Expr.cpp:2722-2725
+ if (ConstantExpr *CE = dyn_cast<ConstantExpr>(E)) {
+ E = CE->getSubExpr();
+ continue;
+ }
----------------
rnk wrote:
> majnemer wrote:
> > Just curious, why not go even further and use FullExpr rather than ConstantExpr?
> That would include MaterializeTemporaryExpr. Do you think we should consider that a noop cast? You could make the argument that it is, but I was aiming to match pre ConstantExpr behavior.
MaterializeTemporaryExpr is not a FullExpr. It would include ExprWithCleanups, though, and ExprWithCleanups is almost exclusively used by CodeGen, which probably shouldn't be calling this function.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55853/new/
https://reviews.llvm.org/D55853
More information about the cfe-commits
mailing list