aboutsummaryrefslogtreecommitdiff
path: root/test/Frontend/system-header-prefix.c
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-06-13 20:27:03 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-06-13 20:27:03 +0000
commitf122a138e39dbb29162abfa9a3d44091d8efa7af (patch)
tree08459273e5a9442d2471a8f499d76c58341011bd /test/Frontend/system-header-prefix.c
parent8ab09da1faaa33b9fa78de59cc4e191bfe9907b5 (diff)
Add -isystem-prefix and -ino-system-prefix arguments, which can be used to
override whether headers are system headers by checking for prefixes of the header name specified in the #include directive. This allows warnings to be disabled for third-party code which is found in specific subdirectories of include paths. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158418 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Frontend/system-header-prefix.c')
-rw-r--r--test/Frontend/system-header-prefix.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Frontend/system-header-prefix.c b/test/Frontend/system-header-prefix.c
new file mode 100644
index 0000000000..31194d96e5
--- /dev/null
+++ b/test/Frontend/system-header-prefix.c
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -isystem-prefix libs/ -ino-system-prefix libs/mylib/ -I%S/Inputs/SystemHeaderPrefix -Wundef -E %s 2>&1 | FileCheck %s
+
+#include "src/all.h"
+
+// CHECK-NOT: BOOST
+// CHECK: libs/mylib/warn.h:1:5: warning: 'MYLIB' is not defined, evaluates to 0
+// CHECK-NOT: BOOST
+// CHECK: libs/mylib/warn.h:1:5: warning: 'MYLIB' is not defined, evaluates to 0
+// CHECK-NOT: BOOST
+// CHECK: src/warn.h:1:5: warning: 'SRC' is not defined, evaluates to 0
+// CHECK-NOT: BOOST