Skip to content

C++ callers misses member pointer method calls via -> #445

@LKlei

Description

@LKlei

Summary

codegraph callers does not report callers for a C++ member function when it is invoked through a typed member pointer.

Environment

  • OS: Windows
  • CodeGraph version: <paste codegraph --version output>
  • Project language: C++
  • Command used to index: codegraph init -i or codegraph index

Minimal example

Header:

class CDetect {
public:
    eAlgStateCode Processing();
};

class CDetector {
private:
    CDetect *m_cpAlg = NULL;

public:
    eAlgStateCode Run();
    eAlgStateCode Flush();
};

Source: 

eAlgStateCode CDetector::Run()
{
    eAlgStateCode eDetectCode = m_cpAlg->Processing();
    return eDetectCode;
}

eAlgStateCode CDetector::Flush()
{
    eAlgStateCode eDetectCode =  m_cpAlg->Processing();
    return eDetectCode;
}

eAlgStateCode CDetect::Processing()
{
    ...
}

Expected behavior:
codegraph callers CDetect::Processing

out> CDetector::Run
         CDetector::Flush

Actual behavior
[i] No callers found for "CDetect::Processing", also codegraph callers Processing returens no calls.


addtional informations
codegraph --version
0.9.4

codegraph status

Index Statistics:
  Files:     9
  Nodes:     225
  Edges:     331
  DB Size:   0.60 MB
  Backend:   node:sqlite - built-in (full WAL)
  Journal:   wal

Nodes by Kind:
  function        98
  import          59
  method          31
  struct          18
  file            9
  class           6
  enum_member     2
  enum            1
  variable        1

Files by Language:
  cpp             6
  c               2
  python          1

[OK] Index is up to date

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions