]> granicus.if.org Git - clang/commit
Improve the diagnostic and recovery for missing colons after 'case'
authorDouglas Gregor <dgregor@apple.com>
Thu, 23 Dec 2010 22:56:40 +0000 (22:56 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 23 Dec 2010 22:56:40 +0000 (22:56 +0000)
commit662a4822ee7c8696434b054303c5076a606ab175
treeb8610ed895bb1530766b3c9f964aa53771b0953c
parenta8bc8c9e9ba5bffebde00340786fe8542469c435
Improve the diagnostic and recovery for missing colons after 'case'
and 'default' statements, including a Fix-It to add the colon:

test/Parser/switch-recovery.cpp:13:12: error: expected ':' after 'case'
    case 17 // expected-error{{expected ':' after 'case'}}
           ^
           :
test/Parser/switch-recovery.cpp:16:12: error: expected ':' after 'default'
    default // expected-error{{expected ':' after 'default'}}
           ^
           :

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122522 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Parse/ParseStmt.cpp
test/Parser/switch-recovery.cpp