[cfe-commits] r125640 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaChecking.cpp lib/Sema/SemaExpr.cpp test/Analysis/out-of-bounds.c test/Sema/array-bounds.c

Ted Kremenek kremenek at apple.com
Thu Feb 17 09:50:49 PST 2011


On Feb 17, 2011, at 9:36 AM, Chris Lattner wrote:

> 
> On Feb 17, 2011, at 9:29 AM, Chandler Carruth wrote:
> 
>> On Thu, Feb 17, 2011 at 9:25 AM, Chris Lattner <clattner at apple.com> wrote:
>> so it's the same as the other case.  I thought we already had some infrastructure for disabling warnings in unreachable code?
>> 
>> Only in as much as the CFG we build for a few warnings will prune provably dead code. We're not using that here, this is a type-based warning. And I have to agree with Ted that these are all time-bombs in the code, waiting for a future maintainer to create a runtime error.
> 
> I'm fine with that in this case, the problem is that we have other warnings that get emitted in dead branches of ?: expressions etc, which occur due to macro expansion.
> 

I can see the argument that if it is dead code in a macro that we could suppress the warning, but not if it is live code in a macro.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110217/22db7408/attachment.html>


More information about the cfe-commits mailing list