mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
14 lines
228 B
C++
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;
|
|
}
|