Fix in call graph construction: don't build call graph node for callee function twice for functions with forward declarations.
Maybe the same fix should be done and for VisitObjCMethodDecl. Unfortunately, I have not enough expertise in ObjC, so I did not touch this code.
Test case:
void do_nothing() {}
void test_single_call();
void test_single_call() {
do_nothing();
}
Output for the test case WITHOUT patch:
Function: test_single_call calls: do_nothing do_nothing
Function: do_nothing calls:
Output for the test case WITH patch:
Function: test_single_call calls: do_nothing
Function: do_nothing calls: