Skip to content

[C++] data flow node not found #21032

Description

@hello123leo

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_":

Image

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.

Activity

  1. rusoprivate883-prog commented on Dec 13, 2025

    @rusoprivate883-prog
  2. praveenkumarlodhi979-tech commented on Dec 13, 2025

    @praveenkumarlodhi979-tech
  3. nunubetrappin commented on Dec 13, 2025

    @nunubetrappin
  4. mbg commented on Dec 17, 2025

    @mbg
    Member

    Hi @hello123leo 👋🏻

    I have been able to confirm this behaviour. I'll check with the relevant team to see whether this is a bug or somehow intentional.

  5. mbg commented on Dec 17, 2025

    @mbg
    Member

    Hi again @hello123leo,

    I have checked with the team and they can confirm that this is a bug. They will look at getting this fixed, but we can't currently provide a timeline for when a fix might be ready. We will post an update here when there is one.

  6. added
    bugSomething isn't working
    acknowledgedGitHub staff acknowledges this issue
    and removed
    questionFurther information is requested
    on Dec 17, 2025
  7. hello123leo commented on Dec 19, 2025

    @hello123leo
    Author

    Thanks @mbg .
    Looking forward to a fix.

  8. nunubetrappin commented on Jan 24, 2026

    @nunubetrappin
  9. jketema commented on Mar 30, 2026

    @jketema
    Contributor

    This will be fixed by #21611

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C++acknowledgedGitHub staff acknowledges this issuebugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions