Skip to content

Class member function calls don't map to class #967

Closed

Description

@kzsnow

Parsing this code:

1  class MyClass
2  {
3  public:
4      int bar()
5      {
6          return 1;
7      }
8  };
9
10 void myfunc()
11 {
12     MyClass *foo = new MyClass();
13     foo->bar();
14 }

I expect the CALL node name on line 13 to be MyClass::bar(), but the name is foo->bar(). Further, an internal METHOD node is correctly created for MyClass::bar(), but there is also one created for an external function called foo->bar().

Is this expected/correct? If yes, is there a way to determine that CALL foo->bar() node is referring to type MyClass, or would one need to implement some type propagation atop the graph to arrive at that?

Thanks!

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions