summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2018-03-07 03:00:25 +0000
committerNico Weber <nicolasweber@gmx.de>2018-03-07 03:00:25 +0000
commitb2ecd46ae43decd73a7f9fc949fa4eda73b302b6 (patch)
tree3f8b131fbb31a6da5fdac7a370904876cfc6e872 /clang/lib/AST
parent4cbeeb16959e8b1de5237e092a635e2c137d15a1 (diff)
downloadbcm5719-llvm-b2ecd46ae43decd73a7f9fc949fa4eda73b302b6.tar.gz
bcm5719-llvm-b2ecd46ae43decd73a7f9fc949fa4eda73b302b6.zip
Revert 326766 too, after r326862 the test fails and I don't know how to fix.
llvm-svn: 326869
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/ExprConstant.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index c3e41658c29..45df133ad57 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -133,11 +133,7 @@ namespace {
E = E->IgnoreParens();
// If we're doing a variable assignment from e.g. malloc(N), there will
- // probably be a cast of some kind. In exotic cases, we might also see a
- // top-level ExprWithCleanups. Ignore them either way.
- if (const auto *EC = dyn_cast<ExprWithCleanups>(E))
- E = EC->getSubExpr()->IgnoreParens();
-
+ // probably be a cast of some kind. Ignore it.
if (const auto *Cast = dyn_cast<CastExpr>(E))
E = Cast->getSubExpr()->IgnoreParens();
OpenPOWER on IntegriCloud