From 71f3e19df07e179f41e891abbd8c100df486aace Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Sun, 5 Oct 2008 15:03:47 +0000 Subject: Disambiguate between a declaration or expression for the 'condition' part of a if/switch/while/for statement. llvm-svn: 57109 --- clang/lib/Parse/ParseExprCXX.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Parse/ParseExprCXX.cpp') diff --git a/clang/lib/Parse/ParseExprCXX.cpp b/clang/lib/Parse/ParseExprCXX.cpp index 28071b6e29d..8b4db309508 100644 --- a/clang/lib/Parse/ParseExprCXX.cpp +++ b/clang/lib/Parse/ParseExprCXX.cpp @@ -162,7 +162,7 @@ Parser::ExprResult Parser::ParseCXXTypeConstructExpression(const DeclSpec &DS) { /// '=' assignment-expression /// Parser::ExprResult Parser::ParseCXXCondition() { - if (!isDeclarationSpecifier()) + if (!isCXXConditionDeclaration()) return ParseExpression(); // expression SourceLocation StartLoc = Tok.getLocation(); -- cgit v1.2.3