summaryrefslogtreecommitdiffstats
path: root/test/Index
diff options
context:
space:
mode:
Diffstat (limited to 'test/Index')
-rw-r--r--test/Index/skipped-bodies-unused.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Index/skipped-bodies-unused.cpp b/test/Index/skipped-bodies-unused.cpp
new file mode 100644
index 0000000000..fc1ebc8efd
--- /dev/null
+++ b/test/Index/skipped-bodies-unused.cpp
@@ -0,0 +1,8 @@
+// RUN: env CINDEXTEST_SKIP_FUNCTION_BODIES=1 c-index-test -test-load-source all %s -Wunused-parameter 2>&1 \
+// RUN: | FileCheck %s
+
+// No 'unused parameter' warnings should be shown when skipping the function bodies.
+inline int foo(int used, int unused) {
+ used = 100;
+}
+// CHECK-NOT: warning: unused parameter