-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
Description
See the following C++ and codeql code:
#include <cstdio>
struct Test {
const char * operator()() const {
return "Hello, World!";
}
};
void f(Test st) {
puts(st());
}
int main() {
f(Test());
}from Function func, FunctionCall fc
where func.getName().matches("f")
and fc.getTarget() = func
select fc, fc.getArgument(0)When I query the C++ code, codeql says the argument of FunctionCall is 0 instead of an instance of struct Test.
Is this a bug? Or some intended behavior?