forked from OSchip/llvm-project
"Do" loops cannot have condition variables, so don't parse them.
llvm-svn: 89801
This commit is contained in:
parent
680f861d74
commit
7f800f9d50
|
@ -875,10 +875,9 @@ Parser::OwningStmtResult Parser::ParseDoStatement(AttributeList *Attr) {
|
|||
}
|
||||
|
||||
// Parse the parenthesized condition.
|
||||
OwningExprResult Cond(Actions);
|
||||
SourceLocation LPLoc, RPLoc;
|
||||
ParseParenExprOrCondition(Cond, true, &LPLoc, &RPLoc);
|
||||
|
||||
SourceLocation LPLoc = ConsumeParen();
|
||||
OwningExprResult Cond = ParseExpression();
|
||||
SourceLocation RPLoc = MatchRHSPunctuation(tok::r_paren, LPLoc);
|
||||
DoScope.Exit();
|
||||
|
||||
if (Cond.isInvalid() || Body.isInvalid())
|
||||
|
|
|
@ -106,9 +106,6 @@ template<typename T> struct Do0 {
|
|||
void f(T t) {
|
||||
do {
|
||||
} while (t); // expected-error{{not contextually}}
|
||||
|
||||
do {
|
||||
} while (T t2 = T());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue