diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-05-06 21:39:56 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-05-06 21:39:56 +0000 |
commit | 12cc7eeb821e536df420c90513936a42c901c263 (patch) | |
tree | c7c57e17a52c427277571fe5f09e674f21f8c47f /clang/lib/Sema/TreeTransform.h | |
parent | 66bfb27545e32172b80581f2c40b9d088ef1cb3b (diff) | |
download | bcm5719-llvm-12cc7eeb821e536df420c90513936a42c901c263.tar.gz bcm5719-llvm-12cc7eeb821e536df420c90513936a42c901c263.zip |
Fixed DISABLE_SMART_POINTERS breakage
llvm-svn: 103198
Diffstat (limited to 'clang/lib/Sema/TreeTransform.h')
-rw-r--r-- | clang/lib/Sema/TreeTransform.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index 43ffbfb737b..9825086809a 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -763,9 +763,12 @@ public: SourceLocation ElseLoc, StmtArg Else) { if (Cond.get()) { // Convert the condition to a boolean value. - Cond = getSema().ActOnBooleanCondition(0, IfLoc, move(Cond)); - if (Cond.isInvalid()) + OwningExprResult CondE = getSema().ActOnBooleanCondition(0, IfLoc, + move(Cond)); + if (CondE.isInvalid()) return getSema().StmtError(); + + Cond = move(CondE); } Sema::FullExprArg FullCond(getSema().MakeFullExpr(Cond)); @@ -804,9 +807,11 @@ public: StmtArg Body) { if (Cond.get()) { // Convert the condition to a boolean value. - Cond = getSema().ActOnBooleanCondition(0, WhileLoc, move(Cond)); - if (Cond.isInvalid()) + OwningExprResult CondE = getSema().ActOnBooleanCondition(0, WhileLoc, + move(Cond)); + if (CondE.isInvalid()) return getSema().StmtError(); + Cond = move(CondE); } Sema::FullExprArg FullCond(getSema().MakeFullExpr(Cond)); @@ -838,9 +843,12 @@ public: SourceLocation RParenLoc, StmtArg Body) { if (Cond.get()) { // Convert the condition to a boolean value. - Cond = getSema().ActOnBooleanCondition(0, ForLoc, move(Cond)); - if (Cond.isInvalid()) + OwningExprResult CondE = getSema().ActOnBooleanCondition(0, ForLoc, + move(Cond)); + if (CondE.isInvalid()) return getSema().StmtError(); + + Cond = move(CondE); } Sema::FullExprArg FullCond(getSema().MakeFullExpr(Cond)); |