mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
Merge pull request #12356 from MathiasVP/use-phi-reads
C++: Include "phi reads" in `DataFlow::Node`
This commit is contained in:
@@ -615,3 +615,16 @@ void test_flow_through_void_double_pointer(int *p) // $ ast-def=p
|
||||
void* q = (void*)&p;
|
||||
sink(**(int**)q); // $ ir MISSING: ast
|
||||
}
|
||||
|
||||
void use(int *);
|
||||
|
||||
void test_def_via_phi_read(bool b)
|
||||
{
|
||||
static int buffer[10]; // This is missing an initialisation in IR dataflow
|
||||
if (b)
|
||||
{
|
||||
use(buffer);
|
||||
}
|
||||
intPointerSource(buffer);
|
||||
sink(buffer); // $ ast,ir
|
||||
}
|
||||
Reference in New Issue
Block a user