Граф коммитов

4 Коммитов

Автор SHA1 Сообщение Дата
Richard Trieu bb9b80c308 Add a fixit suggest for missing case keywords inside a switch scope. For instance, in the following code, 'case ' will be suggested before the '1:'
switch (x) {
  1: return 0;
  default: return 1;
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129943 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-21 21:44:26 +00:00
John McCall f6a3ab0f16 Improve our parse recovery on 'case blah;' and 'default;'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124025 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-22 09:28:32 +00:00
Douglas Gregor 662a4822ee 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
2010-12-23 22:56:40 +00:00
Douglas Gregor 4186ff4fc4 Improve parser recovery when a switch condition is invalid; fixes
<rdar://problem/7971948>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104291 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-20 23:20:59 +00:00