
If we pass a header to libclang, e.g. because it's open in an editor in an IDE, warnings about unused const vars are not useful: other files that include the header might use those constants. So when -x *-header is passed as command-line option, suppress this warning. llvm-svn: 285386
5 lines
271 B
C
5 lines
271 B
C
// RUN: %clang_cc1 -fsyntax-only -Wunused-const-variable -x c-header -ffreestanding -verify %s
|
|
// RUN: %clang_cc1 -fsyntax-only -Wunused-const-variable -x c++-header -ffreestanding -verify %s
|
|
// expected-no-diagnostics
|
|
static const int unused[] = { 2, 3, 5, 7, 11, 13 };
|