mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Merge pull request #14708 from MathiasVP/add-testcase-for-range-analysis
C++: Add range analysis testcase
This commit is contained in:
@@ -130,3 +130,13 @@ void test_div(int x) {
|
||||
range(x >> 2); // $ range=>=0 range=<=2
|
||||
}
|
||||
}
|
||||
|
||||
struct X { int n; };
|
||||
void read_argument(const X *);
|
||||
|
||||
void nonterminating_without_operands_as_ssa(X *x) {
|
||||
read_argument(x);
|
||||
while (x->n) {
|
||||
x->n--;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user