[cfe-commits] Patch - Add fix-it hint for missing case keyword within a switch scope

Richard Trieu rtrieu at google.com
Fri Apr 15 11:58:43 PDT 2011

When a valid expression is followed by a colon inside a switch scope,
suggest a fix-it hint to insert a case before the expression.

int f1(int i) {
 switch (i) {
   0: return 1;
   default: return 0;

case.cc:3:4: error: expected 'case' keyword before expression
   0: return 1;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110415/0179c2ac/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: missing-case-keyword.patch
Type: text/x-patch
Size: 6315 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110415/0179c2ac/attachment.bin>

More information about the cfe-commits mailing list