YouCompleteMe/cpp/llvm/tools/clang/test/Analysis/debug-CallGraph.c
Strahinja Val Markovic 1f51a89d39 Adding more llvm/clang files
These were ignored by git accidentally. We want ALL OF THEM since they all came
in the llvm/clang source distribution.
2012-07-05 17:55:45 -07:00

22 lines
344 B
C

// RUN: %clang_cc1 -analyze -analyzer-checker=debug.DumpCallGraph %s 2>&1 | FileCheck %s
static void mmm(int y) {
if (y != 0)
y++;
y = y/0;
}
static int foo(int x, int y) {
mmm(y);
if (x != 0)
x++;
return 5/x;
}
void aaa() {
foo(1,2);
}
// CHECK:--- Call graph Dump ---
// CHECK: Function: < root > calls: aaa