Visit(Child);
popRegions(Index);
}
- } else
+ } else {
+ handleFileExit(getStart(Body));
propagateCounts(Counter::getZero(), Body);
+ }
BreakContinue BC = BreakContinueStack.pop_back_val();
if (!BreakContinueStack.empty())
BreakContinueStack.back().ContinueCount, BC.ContinueCount);
Counter ExitCount = getRegionCounter(S);
- pushRegion(ExitCount, getStart(S), getEnd(S));
+ SourceLocation ExitLoc = getEnd(S);
+ pushRegion(ExitCount, getStart(S), ExitLoc);
+ handleFileExit(ExitLoc);
}
void VisitSwitchCase(const SwitchCase *S) {
END
}
+// PR27948 - Crash when handling a switch partially covered by a macro
+// CHECK: baz
+#define START2 switch (0) default:
+void baz() {
+ for (;;)
+ START2 return; // CHECK: Expansion,File 0, [[@LINE]]:5 -> [[@LINE]]:11 = #1 (Expanded file = 1)
+}
+
int main(int argc, const char *argv[]) {
foo(3);
return 0;