]> granicus.if.org Git - clang/commit
improve error recovery for extra ')'s after a if/switch/while condition. Before:
authorChris Lattner <sabre@nondot.org>
Sat, 28 Apr 2012 16:24:20 +0000 (16:24 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 28 Apr 2012 16:24:20 +0000 (16:24 +0000)
commitbddc7e5ed3982b5845e4fbb5d9bc7b7431c35a4f
treef07ae427142b22a727e2f37f5ecd9fc25d11b21e
parent8bb21d32e9ccc9d9c221506dff26acafa8724cca
improve error recovery for extra ')'s after a if/switch/while condition.  Before:

t.c:3:9: error: expected expression
  if (x)) {
        ^

.. which isn't even true - a statement or expression is fine.  After:

t.c:3:9: error: extraneous ')' after condition, expected a statement
  if (x)) {
        ^

This is the second part of PR12595

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155762 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticParseKinds.td
lib/Parse/ParseStmt.cpp
test/Parser/recovery.c