[PATCH] D55853: Ignore ConstantExpr in IgnoreParenNoopCasts

2018-12-19 Thread Reid Kleckner via Phabricator via cfe-commits
rnk marked an inline comment as done. rnk added inline comments. Comment at: clang/lib/AST/Expr.cpp:2694 while (true) { E = E->IgnoreParens(); rsmith wrote: > Maybe `IgnoreParens` should be doing this itself? I can do that, it passes tests. CHANGES SI

[PATCH] D55853: Ignore ConstantExpr in IgnoreParenNoopCasts

2018-12-19 Thread Reid Kleckner via Phabricator via cfe-commits
rnk updated this revision to Diff 178960. rnk added a comment. - move to IgnoreParens CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55853/new/ https://reviews.llvm.org/D55853 Files: clang/lib/AST/Expr.cpp clang/test/CodeGenCXX/mangle-ms-templates.cpp Index: clang/test/CodeGenCXX/

[PATCH] D55853: Ignore ConstantExpr in IgnoreParenNoopCasts

2018-12-18 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/AST/Expr.cpp:2694 while (true) { E = E->IgnoreParens(); Maybe `IgnoreParens` should be doing this itself? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55853/new/ https://reviews.llvm.org/D5

[PATCH] D55853: Ignore ConstantExpr in IgnoreParenNoopCasts

2018-12-18 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/AST/Expr.cpp:2722-2725 +if (ConstantExpr *CE = dyn_cast(E)) { + E = CE->getSubExpr(); + continue; +} rnk wrote: > majnemer wrote: > > Just curious, why not go even further and use FullExpr rath

[PATCH] D55853: Ignore ConstantExpr in IgnoreParenNoopCasts

2018-12-18 Thread Reid Kleckner via Phabricator via cfe-commits
rnk marked an inline comment as done. rnk added inline comments. Comment at: clang/lib/AST/Expr.cpp:2722-2725 +if (ConstantExpr *CE = dyn_cast(E)) { + E = CE->getSubExpr(); + continue; +} majnemer wrote: > Just curious, why not go even further a

[PATCH] D55853: Ignore ConstantExpr in IgnoreParenNoopCasts

2018-12-18 Thread David Majnemer via Phabricator via cfe-commits
majnemer added inline comments. Comment at: clang/lib/AST/Expr.cpp:2722-2725 +if (ConstantExpr *CE = dyn_cast(E)) { + E = CE->getSubExpr(); + continue; +} Just curious, why not go even further and use FullExpr rather than ConstantExpr? CHANGES

[PATCH] D55853: Ignore ConstantExpr in IgnoreParenNoopCasts

2018-12-18 Thread Reid Kleckner via Phabricator via cfe-commits
rnk created this revision. rnk added reviewers: void, rsmith. It is ignored by IgnoreParenImpCasts, so it seems reasonable to ignore it here as well. Besides, this preserves behavior from before this AST node was added. Fixes PR39881 https://reviews.llvm.org/D55853 Files: clang/lib/AST/Expr.