[cfe-commits] Removing redundant default cases
David Blaikie
dblaikie at gmail.com
Mon Oct 17 23:02:06 PDT 2011
On Fri, Sep 23, 2011 at 7:20 PM, David Blaikie <dblaikie at gmail.com> wrote:
> I hacked up a cheap version of a warning for defaults in switches that
> already cover all cases in an enum (the warning is in excess_default.diff -
> given some discussion with Chandler on IRC I don't think we consider this to
> be sufficiently high quality to be checked in, but I wouldn't mind some
> other opinions/thoughts (the issue was that it might need to use the CFG to
> ensure that it's not reachable via loops nested in the switch or gotos,
> fallthroughs etc)) and I found/fixed the following cases
> (excess_default_fixes.diff)
>
(bump)
While I realize the added compiler warning needs work (lots of it - CFG
analysis & all that as mentioned/discussed with Ted), is there any interest
in having the fixes checked in? (I have a similar CR for the llvm code too
that I might not worry about bumping until this one gets resolved, one way
or another (I'm not sure if the LLVM core developers have quite the same
adherence/preference for this particular convention as the Clang
developers))
- David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111017/de664d30/attachment.html>
More information about the cfe-commits
mailing list