Files
codeql/cpp/ql/test/library-tests/rangeanalysis/RangeSSA/test.cpp
2018-08-02 17:53:23 +01:00

14 lines
228 B
C++

bool test_references(int a) {
// x is a reference, so it only has one definition.
int &x = a;
int *ptr = &x;
if (x > 10) {
x--;
if (x < 5) {
return 1;
}
}
return 0;
}