diff options
author | Richard Trieu <rtrieu@google.com> | 2011-07-01 20:54:02 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2011-07-01 20:54:02 +0000 |
commit | 31fd2b7881efc6b7b1e466823c10c64ba5ddffe3 (patch) | |
tree | 04d335c185b961dbe2db146da1d2c77c3c123568 /lib/Parse/ParseExpr.cpp | |
parent | 304e233921bcd3b55f68c6e8a2960630edf17ff0 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134258 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseExpr.cpp')
-rw-r--r-- | lib/Parse/ParseExpr.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp index 218e18f3ad..0c6f3c6037 100644 --- a/lib/Parse/ParseExpr.cpp +++ b/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(); } } |