Class member function calls don't map to class
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
Research direction
Start by reproducing the reported C++ snippet and inspecting the generated CALL and METHOD nodes for lines 4 and 13. The issue names no source files or tests, so first locate the parser and graph-generation entry points; done would require an agreed way to represent or resolve the call from foo->bar() to MyClass::bar().
Written by the indexing model from the issue text.
Description
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!
- Dominant language
- Scala
- Stars
- 599
- Forks
- 84
- Avg merge
- 18h 29m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ShiftLeftSecurity/codepropertygraph
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
ShiftLeftSecurity/codepropertygraph#1760 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ShiftLeftSecurity/codepropertygraph#1272 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
ShiftLeftSecurity/codepropertygraph#1082 · 1 comment ·
All issues in ShiftLeftSecurity/codepropertygraph
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ergoplatform/ergodocs#614 ·
-
area:ci enhancement requires-triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
apache/datafusion-comet#6078 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
[VL] madvise(WILLNEED) call fails in MmapFileStream because of wrong calculation of fetching length Openbug triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
chipsalliance/rocket-chip#3831 ·