summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/ignore-warnings-from-headers.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2019-06-11 14:14:24 +0000
committerNikolai Kosjar <nikolai.kosjar@qt.io>2019-06-11 14:14:24 +0000
commit8edd8da4874d79e07a6398088d6831b74758dbc2 (patch)
tree670318825b057b29721c55872b0503cf0c2411e4 /clang/test/Index/ignore-warnings-from-headers.cpp
parent9487963244e4c805cf0f5798d903bdb10012b59d (diff)
downloadbcm5719-llvm-8edd8da4874d79e07a6398088d6831b74758dbc2.tar.gz
bcm5719-llvm-8edd8da4874d79e07a6398088d6831b74758dbc2.zip
[libclang] Allow skipping warnings from all included files
Depending on the included files and the used warning flags, e.g. - Weverything, a huge number of warnings can be reported for included files. As processing that many diagnostics comes with a performance impact and not all clients are interested in those diagnostics, add a flag to skip them. Differential Revision: https://reviews.llvm.org/D48116 llvm-svn: 363067
Diffstat (limited to 'clang/test/Index/ignore-warnings-from-headers.cpp')
-rw-r--r--clang/test/Index/ignore-warnings-from-headers.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Index/ignore-warnings-from-headers.cpp b/clang/test/Index/ignore-warnings-from-headers.cpp
new file mode 100644
index 00000000000..3b8d765c4a6
--- /dev/null
+++ b/clang/test/Index/ignore-warnings-from-headers.cpp
@@ -0,0 +1,7 @@
+#include "ignore-warnings-from-headers.h"
+
+void g(int unusedInMainFile) {}
+
+// RUN: env CINDEXTEST_IGNORE_NONERRORS_FROM_INCLUDED_FILES=1 c-index-test -test-load-source function %s -Wunused-parameter 2>&1 | FileCheck %s
+// CHECK-NOT: warning: unused parameter 'unusedInHeader'
+// CHECK: warning: unused parameter 'unusedInMainFile'
OpenPOWER on IntegriCloud