[cfe-commits] Patch: Add warning for undefined reinterpret_cast behavior

Richard Trieu rtrieu at google.com
Thu Apr 28 20:24:09 PDT 2011


Added the level check.  There's two warning messages, so I added a check for
each one.

On Thu, Apr 28, 2011 at 7:36 PM, Argyrios Kyrtzidis <kyrtzidis at apple.com>wrote:

> You don't check whether the warning is turned off to skip the checks
> completely, something like
>
> Diags.getDiagnosticLevel(diag::warn_pointer_indirection_from_incompatible_type,
> OpLoc) != Diagnostic::Ignored)
>
>
> On Apr 28, 2011, at 7:16 PM, Richard Trieu wrote:
>
> Changes to support the white list in [basic.lval]p10.  There should be a
> corresponding test to each list item, except when those dealing with tag
> types since we are skipping them for now.
>
> On Wed, Apr 27, 2011 at 6:11 PM, John McCall <rjmccall at apple.com> wrote:
>
>> On Apr 27, 2011, at 6:07 PM, Richard Trieu wrote:
>> > Is there a way that Clang can check if the warning is turned off and
>> skip the expensive checking?
>>
>> Yes, you can check whether the current mapping for the diagnostic is still
>> "ignore".
>>
>> > And did you mean the list in [basic.lval]p15?  [basic.lval]p10 doesn't
>> have a list.
>>
>> We're just looking at different standards. :)  C++11's [basic.lval]p10 is
>> just minor wording differences from C++03's [basic.lval]p15.
>>
>> John.
>>
>
> <undefined-reinterpret-cast3.patch>
> _______________________________________________
>
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110428/ec11766d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: undefined-reinterpret-cast4.patch
Type: text/x-patch
Size: 11788 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110428/ec11766d/attachment.bin>


More information about the cfe-commits mailing list