-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
questionFurther information is requestedFurther information is requested
Description
g++ version: 4.8.2
codeql version: 2.23.6
main.cpp:
#include "stdint.h"
#include <string>
class Test {
public:
explicit Test(const uint64_t &id) : id_(id) {}
private:
uint64_t id_;
};
int main(int argc, char* argv[]){
Test test(123456);
return 0;
}
create database command:
codeql database create testdb --language=cpp --command='g++ main.cpp -std=c++11' -j 0
query:
from DataFlow::Node n
where n.getLocation().getFile().getBaseName() = "main.cpp"
select n
I can find the data flow node "*constructor init of field id_":
and then i add a string member variable str_ like this(line 9):
#include "stdint.h"
#include <string>
class Test {
public:
explicit Test(const uint64_t &id) : id_(id) {}
private:
std::string str_{};
uint64_t id_;
};
int main(int argc, char* argv[]){
Test test(123456);
return 0;
}
use the same command to create a new database and the same query to analyze, it seems that i can not find the data flow node "*constructor init of field id_" in the new database.
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested