diff options
author | John McCall <rjmccall@apple.com> | 2011-11-10 05:35:25 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-11-10 05:35:25 +0000 |
commit | 28fc70910fa826cde9a98f5582a4281eacd8ad7b (patch) | |
tree | bb1ca3a75e8b8c78ca5e72bfbeaf15a9c01dd079 /clang/lib/Sema/SemaChecking.cpp | |
parent | 6f4c06069c73438bff3a4cdf358e20a6628ea802 (diff) | |
download | bcm5719-llvm-28fc70910fa826cde9a98f5582a4281eacd8ad7b.tar.gz bcm5719-llvm-28fc70910fa826cde9a98f5582a4281eacd8ad7b.zip |
There's no good reason to track temporaries in ExprWithCleanups,
but it is sometimes useful to track blocks. Do so. Also
optimize the storage of these expressions.
llvm-svn: 144263
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 6fbdb5163cf..ad290fa5687 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -2676,6 +2676,9 @@ static Expr *EvalAddr(Expr *E, SmallVectorImpl<DeclRefExpr *> &refVars) { case Stmt::AddrLabelExprClass: return E; // address of label. + case Stmt::ExprWithCleanupsClass: + return EvalAddr(cast<ExprWithCleanups>(E)->getSubExpr(), refVars); + // For casts, we need to handle conversions from arrays to // pointer values, and pointer-to-pointer conversions. case Stmt::ImplicitCastExprClass: @@ -2752,6 +2755,9 @@ do { return NULL; } + case Stmt::ExprWithCleanupsClass: + return EvalVal(cast<ExprWithCleanups>(E)->getSubExpr(), refVars); + case Stmt::DeclRefExprClass: { // When we hit a DeclRefExpr we are looking at code that refers to a // variable's name. If it's not a reference variable we check if it has |