mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
C++: Flow from parameters to ConstructorFieldInit
Because `ConstructorFieldInit` (member initializer lists) are not part of the control flow graph, there was no data flow from the initial value of parameters to their uses in member initializers. This commit adds the necessary flow under the assumption that parameters are not overwritten in member initializers.
This commit is contained in:
@@ -25,8 +25,8 @@ public:
|
||||
|
||||
void bar(Foo &f)
|
||||
{
|
||||
sink(f.a()); // flow (through `f` and `h`) [NOT DETECTED]
|
||||
sink(f.b()); // flow (through `g` and `h`) [NOT DETECTED]
|
||||
sink(f.a()); // flow (through `f` and `h`)
|
||||
sink(f.b()); // flow (through `g` and `h`)
|
||||
}
|
||||
|
||||
void foo()
|
||||
|
||||
Reference in New Issue
Block a user