2012-12-21 09:30:23 +08:00
|
|
|
// RUN: %clang_cc1 -analyze -analyzer-checker=debug.DumpCallGraph %s 2>&1 | FileCheck %s
|
2012-03-08 08:42:23 +08:00
|
|
|
|
|
|
|
static void mmm(int y) {
|
|
|
|
if (y != 0)
|
|
|
|
y++;
|
2012-12-21 09:30:23 +08:00
|
|
|
y = y/0;
|
2012-03-08 08:42:23 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
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 ---
|
2012-12-21 09:30:23 +08:00
|
|
|
// CHECK: Function: < root > calls: aaa
|