summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/traversal-begin-end-function.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/traversal-begin-end-function.c')
-rw-r--r--clang/test/Analysis/traversal-begin-end-function.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/test/Analysis/traversal-begin-end-function.c b/clang/test/Analysis/traversal-begin-end-function.c
new file mode 100644
index 00000000000..810ce1d2a52
--- /dev/null
+++ b/clang/test/Analysis/traversal-begin-end-function.c
@@ -0,0 +1,22 @@
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.DumpTraversal %s | FileCheck %s
+
+void inline_callee(int i);
+
+// CHECK: --BEGIN FUNCTION--
+void inline_caller() {
+ // CHECK: --BEGIN FUNCTION--
+ // CHECK: --BEGIN FUNCTION--
+ // CHECK: --BEGIN FUNCTION--
+ inline_callee(3);
+ // CHECK: --END FUNCTION--
+ // CHECK: --END FUNCTION--
+ // CHECK: --END FUNCTION--
+}
+// CHECK: --END FUNCTION--
+
+void inline_callee(int i) {
+ if (i <= 1)
+ return;
+
+ inline_callee(i - 1);
+}
OpenPOWER on IntegriCloud