mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
30 lines
451 B
C
30 lines
451 B
C
|
|
typedef struct
|
|
{
|
|
int x, y;
|
|
} MyCoords;
|
|
|
|
int getX(MyCoords *coords);
|
|
void doSomething(void *something);
|
|
|
|
typedef struct
|
|
{
|
|
char isTrue;
|
|
} MyBool;
|
|
|
|
void myTest_with_local_flow(MyBool *b, int pos) // $ ast-def=b ir-def=*b
|
|
{
|
|
MyCoords coords = {0};
|
|
|
|
if (b->isTrue) {
|
|
goto next;
|
|
}
|
|
|
|
next:
|
|
coords.x = coords.y = pos + 1;
|
|
// There is flow from `{0}` to `coords` in `&coords` on the next line.
|
|
coords.x = getX(&coords);
|
|
|
|
doSomething((void *)&pos);
|
|
}
|