[PATCH] [Analysis] Add a CFG successor to a SwitchStmt if it is both empty and fully covered
Jordan Rose
jordan_rose at apple.com
Tue Jun 4 09:32:29 PDT 2013
Cute, good catch. I think you should just break up that monster conditional into a few ifs, or just |= the enum case into switchExclusivelyCovered, but semantically this looks right.
Jordan
On Jun 4, 2013, at 0:42 , David Majnemer <david.majnemer at gmail.com> wrote:
> Hi,
>
> clang does not consider the case where a SwitchStmt satisfied isAllEnumCasesCovered as well as having no cases at all (i.e. the enum it covers has no enumerators).
>
> The attached patch adds a successor in this case which gives us a proper CFG.
>
> This fixes PR16212.
>
> --
> David Majnemer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PR16212.diff
Type: application/octet-stream
Size: 1653 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130604/8579ec65/attachment.obj>
-------------- next part --------------
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list