}
// Solve
+ CFGBlock::FilterOptions FO;
+ FO.IgnoreDefaultsWithCoveredEnums = 1;
+
while (!WL.empty()) {
const CFGBlock *item = WL.back();
WL.pop_back();
}
reachable.set(item->getBlockID());
- for (CFGBlock::const_succ_iterator I=item->succ_begin(), E=item->succ_end();
- I != E; ++I)
+ for (CFGBlock::filtered_succ_iterator I =
+ item->filtered_succ_start_end(FO); I.hasMore(); ++I)
if (const CFGBlock *B = *I) {
unsigned blockID = B->getBlockID();
if (!reachable[blockID]) {
++count;
WL.push_back(&Start);
- // Find the reachable blocks from 'Start'.
+ // Find the reachable blocks from 'Start'.
+ CFGBlock::FilterOptions FO;
+ FO.IgnoreDefaultsWithCoveredEnums = 1;
+
while (!WL.empty()) {
const CFGBlock *item = WL.back();
WL.pop_back();
// Look at the successors and mark then reachable.
- for (CFGBlock::const_succ_iterator I=item->succ_begin(), E=item->succ_end();
- I != E; ++I)
+ for (CFGBlock::filtered_succ_iterator I= item->filtered_succ_start_end(FO);
+ I.hasMore(); ++I)
if (const CFGBlock *B = *I) {
unsigned blockID = B->getBlockID();
if (!Reachable[blockID]) {
}
}
}
+
+enum Cases { C1, C2, C3 };
+int test_enum_cases(enum Cases C) {
+ switch (C) {
+ case C1:
+ case C2:
+ case C3:
+ return 1;
+ default: {
+ int i = 0; // expected-warning{{will never be executed}}
+ ++i;
+ return i;
+ }
+ }
+}
+