llvm/clang/test/Index/ignore-warnings-from-headers.cpp
Nikolai Kosjar 8edd8da487 [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
2019-06-11 14:14:24 +00:00

8 lines
332 B
C++

#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'