diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-12-19 22:12:41 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-12-19 22:12:41 +0000 |
commit | bc6abe93a5d6b1305411f8b6f54c2caa686ddc69 (patch) | |
tree | 7c61217bca04a01daaa873f5b16847788ac4e5fc /lib/AST/ExprConstant.cpp | |
parent | af2c7a194592401394233b7cbcdd3cfd0a7a38dd (diff) |
Evaluation support for ExprWithCleanups. We won't evaluate any expression which
actually requires non-trivial cleanups, so no cleanups need to be performed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146916 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ExprConstant.cpp')
-rw-r--r-- | lib/AST/ExprConstant.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp index 630136ea7f..3c2ffbd0f7 100644 --- a/lib/AST/ExprConstant.cpp +++ b/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; |