[cfe-commits] [PATCH] Improve diagnostics on missing expression in switch statements

David Majnemer david.majnemer at gmail.com
Fri Jun 10 14:55:15 PDT 2011


Hi Richard,

I added two tests to match the two switch "forms" that the patch addresses.

-- 
David Majnemer

On Thu, Jun 9, 2011 at 6:54 PM, Richard Trieu <rtrieu at google.com> wrote:
> Hi David,
> I looked over your patch and don't see any problems with it.  There doesn't
> appear to be any test cases for this error.  Could you add some along with
> your patch?
> Richard.
> On Thu, Jun 9, 2011 at 12:46 AM, Chandler Carruth <chandlerc at google.com>
> wrote:
>>
>> Hey,
>> Not sure if you follow cfe-commits closely or not, but thought this would
>> be a good patch for you to review as you're the last to touch it.
>>
>> ---------- Forwarded message ----------
>> From: David Majnemer <david.majnemer at gmail.com>
>> Date: Wed, Jun 8, 2011 at 11:59 PM
>> Subject: [cfe-commits] [PATCH] Improve diagnostics on missing expression
>> in switch statements
>> To: cfe-commits at cs.uiuc.edu
>>
>>
>> Hi,
>>
>> I think that clang's diagnostics for switch statements missing
>> expressions could be improved a little bit.
>> Attached is a patch that will move the diagnostic to right after the
>> colon and properly suggests to insert an empty expression.
>>
>> --
>> David Majnemer
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: switch_case_label2.patch
Type: application/octet-stream
Size: 2092 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110610/9f953927/attachment.obj>


More information about the cfe-commits mailing list