mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
C++: Port a test from the experimental directory to show that it works in the non-experimental "new" range analysis.
This commit is contained in:
@@ -145,4 +145,15 @@ void nonterminating_without_operands_as_ssa(X *x) {
|
||||
while (x->n) {
|
||||
x->n--;
|
||||
}
|
||||
}
|
||||
|
||||
void test_with_irreduble_cfg(int i, int x) {
|
||||
if (x < i) {
|
||||
} else {
|
||||
goto inLoop;
|
||||
}
|
||||
for(; i < x; i++) {
|
||||
inLoop:
|
||||
range(i); // $ range="<=InitializeParameter: x+0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user