mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
26 lines
489 B
C++
26 lines
489 B
C++
// semmle-extractor-options: -std=c++17
|
|
|
|
long __builtin_expect(long);
|
|
|
|
void f(int *v) {
|
|
int *w;
|
|
bool b, c;
|
|
|
|
if (v) {}
|
|
if (!v) {}
|
|
if (v == 0) {}
|
|
if ((!v) == 0) {}
|
|
if (v != 0) {}
|
|
if ((!v) != 0) {}
|
|
if(__builtin_expect((long)v)) {}
|
|
if(__builtin_expect((long)!v)) {}
|
|
if (true && v) {}
|
|
if (v && true) {}
|
|
if (true && !v) {}
|
|
if (!v && true) {}
|
|
if (b = !v) {}
|
|
if (c = !v; c) {}
|
|
if (int *x = v; x) {}
|
|
if (int *y = v) {}
|
|
}
|