summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseExpr.cpp
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2011-07-01 20:54:02 +0000
committerRichard Trieu <rtrieu@google.com>2011-07-01 20:54:02 +0000
commit94942b32a36e2246e7bf4ce3122a3e41729bcdae (patch)
tree50575414c75e6f7d0dd6af60669213e54e61ea2f /clang/lib/Parse/ParseExpr.cpp
parent54b68e34322314528624fd56ec32df8968c41a94 (diff)
downloadbcm5719-llvm-94942b32a36e2246e7bf4ce3122a3e41729bcdae.tar.gz
bcm5719-llvm-94942b32a36e2246e7bf4ce3122a3e41729bcdae.zip
For code such as:
int f(int x) { if (int foo = f(bar)) {} return 0; } Clang produces the following error messages: paren_imbalance.cc:2:19: error: use of undeclared identifier 'bar' if (int foo = f(bar)) {} ^ paren_imbalance.cc:2:26: error: expected ')' if (int foo = f(bar)) {} ^ paren_imbalance.cc:2:6: note: to match this '(' if (int foo = f(bar)) {} ^ The second error is incorrect. This patch will stop Clang from producing an error on parenthesis imbalance during error recovery when there isn't one. llvm-svn: 134258
Diffstat (limited to 'clang/lib/Parse/ParseExpr.cpp')
-rw-r--r--clang/lib/Parse/ParseExpr.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp
index 218e18f3ad7..0c6f3c6037e 100644
--- a/clang/lib/Parse/ParseExpr.cpp
+++ b/clang/lib/Parse/ParseExpr.cpp
@@ -1260,7 +1260,6 @@ Parser::ParsePostfixExpressionSuffix(ExprResult LHS) {
if (Tok.isNot(tok::r_paren)) {
if (ParseExpressionList(ArgExprs, CommaLocs, &Sema::CodeCompleteCall,
LHS.get())) {
- SkipUntil(tok::r_paren);
LHS = ExprError();
}
}
OpenPOWER on IntegriCloud