Fixed DISABLE_SMART_POINTERS breakage
llvm-svn: 103198
diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp
index 71bda78..e68e0ea 100644
--- a/clang/lib/Parse/ParseStmt.cpp
+++ b/clang/lib/Parse/ParseStmt.cpp
@@ -989,6 +989,7 @@
bool ForEach = false;
OwningStmtResult FirstPart(Actions);
+ bool SecondPartIsInvalid = false;
FullExprArg SecondPart(Actions);
OwningExprResult Collection(Actions);
FullExprArg ThirdPart(Actions);
@@ -1062,13 +1063,14 @@
Second = Actions.ActOnBooleanCondition(CurScope, ForLoc,
move(Second));
}
+ SecondPartIsInvalid = Second.isInvalid();
SecondPart = Actions.MakeFullExpr(Second);
}
if (Tok.is(tok::semi)) {
ConsumeToken();
} else {
- if (!SecondPart->isInvalid() || SecondVar.get())
+ if (!SecondPartIsInvalid || SecondVar.get())
Diag(Tok, diag::err_expected_semi_for);
SkipUntil(tok::semi);
}