]> granicus.if.org Git - clang/commit
Analysis: Add a CFG successor to a SwitchStmt if it is both empty and fully covered
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 4 Jun 2013 17:38:44 +0000 (17:38 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 4 Jun 2013 17:38:44 +0000 (17:38 +0000)
commit2a1551fa14728891bf8e325d3eb686ed404cd8b2
tree765ab6cb626421889ca01d6abbc09615b6f423a2
parent49e1d9814a34e4024a347c2fce8e9567c40e6bf5
Analysis: Add a CFG successor to a SwitchStmt if it is both empty and fully covered

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).

In this case, we should add a successor to repair the CFG.

This fixes PR16212.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183237 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/CFG.cpp
test/Analysis/cfg.cpp