summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ExprConstant.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-12-19 22:12:41 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-12-19 22:12:41 +0000
commit5894a9138c188766e109f1d7de48c3d1fee0cec6 (patch)
treed2511f3822a5e5325035ea72a99636ac4efb1b43 /clang/lib/AST/ExprConstant.cpp
parentd0b111c3ddfd53869e00f92e782a9373a176cf0e (diff)
downloadbcm5719-llvm-5894a9138c188766e109f1d7de48c3d1fee0cec6.tar.gz
bcm5719-llvm-5894a9138c188766e109f1d7de48c3d1fee0cec6.zip
Evaluation support for ExprWithCleanups. We won't evaluate any expression which
actually requires non-trivial cleanups, so no cleanups need to be performed. llvm-svn: 146916
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r--clang/lib/AST/ExprConstant.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index 630136ea7f8..3c2ffbd0f7b 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -1799,6 +1799,10 @@ public:
{ return StmtVisitorTy::Visit(E->getReplacement()); }
RetTy VisitCXXDefaultArgExpr(const CXXDefaultArgExpr *E)
{ return StmtVisitorTy::Visit(E->getExpr()); }
+ // We cannot create any objects for which cleanups are required, so there is
+ // nothing to do here; all cleanups must come from unevaluated subexpressions.
+ RetTy VisitExprWithCleanups(const ExprWithCleanups *E)
+ { return StmtVisitorTy::Visit(E->getSubExpr()); }
RetTy VisitCXXReinterpretCastExpr(const CXXReinterpretCastExpr *E) {
CCEDiag(E, diag::note_constexpr_invalid_cast) << 0;
OpenPOWER on IntegriCloud