summaryrefslogtreecommitdiffstats
path: root/test/Analysis/debug-CallGraph.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/debug-CallGraph.c')
-rw-r--r--test/Analysis/debug-CallGraph.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/test/Analysis/debug-CallGraph.c b/test/Analysis/debug-CallGraph.c
index b7c7c8a..4523c78 100644
--- a/test/Analysis/debug-CallGraph.c
+++ b/test/Analysis/debug-CallGraph.c
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=debug.DumpCallGraph %s 2>&1 | FileCheck %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=debug.DumpCallGraph %s -fblocks 2>&1 | FileCheck %s
static void mmm(int y) {
if (y != 0)
y++;
- y = y/0;
+ y = y/y;
}
static int foo(int x, int y) {
@@ -17,5 +17,17 @@ void aaa() {
foo(1,2);
}
+void bbb(int y) {
+ int x = (y > 2);
+ ^ {
+ foo(x, y);
+ }();
+}
+
// CHECK:--- Call graph Dump ---
-// CHECK: Function: < root > calls: aaa
+// CHECK: Function: < root > calls: mmm foo aaa < > bbb
+// CHECK: Function: bbb calls: < >
+// CHECK: Function: < > calls: foo
+// CHECK: Function: aaa calls: foo
+// CHECK: Function: foo calls: mmm
+// CHECK: Function: mmm calls:
OpenPOWER on IntegriCloud