[RISCV] Add shrinkwrap test cases showing gaps in current impl
[llvm-project.git] / clang / test / Analysis / cxx-callgraph.cpp
blob4a48e422ce08a1364778f7f37e71a3110a677561
1 // RUN: %clang_analyze_cc1 -analyzer-checker=debug.DumpCallGraph %s 2>&1 | FileCheck %s
3 static int aaa() {
4 return 0;
7 static int bbb(int param=aaa()) {
8 return 1;
11 int ddd();
13 struct c {
14 c(int param=2) : val(bbb(param)) {}
15 int val;
16 int val2 = ddd();
19 int ddd() {
20 c c;
21 return bbb();
24 // CHECK:--- Call graph Dump ---
25 // CHECK-NEXT: {{Function: < root > calls: aaa bbb c::c ddd}}
26 // CHECK-NEXT: {{Function: c::c calls: bbb ddd $}}
27 // CHECK-NEXT: {{Function: ddd calls: c::c bbb aaa $}}
28 // CHECK-NEXT: {{Function: bbb calls: $}}
29 // CHECK-NEXT: {{Function: aaa calls: $}}