aboutsummaryrefslogtreecommitdiff
path: root/test/Index/skipped-function-bodies.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Index/skipped-function-bodies.cpp')
-rw-r--r--test/Index/skipped-function-bodies.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Index/skipped-function-bodies.cpp b/test/Index/skipped-function-bodies.cpp
new file mode 100644
index 000000000000..9378f664bb6f
--- /dev/null
+++ b/test/Index/skipped-function-bodies.cpp
@@ -0,0 +1,9 @@
+// RUN: env CINDEXTEST_SKIP_FUNCTION_BODIES=1 c-index-test -test-load-source all %s 2>&1 \
+// RUN: | FileCheck %s
+
+inline int with_body() { return 10; }
+inline int without_body();
+
+int x = with_body() + without_body();
+// CHECK-NOT: warning: inline function 'with_body' is not defined
+// CHECK: warning: inline function 'without_body' is not defined