aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-07-27 23:06:03 +0000
committerTed Kremenek <kremenek@apple.com>2010-07-27 23:06:03 +0000
commit52198c2e20a2fd471a9b1f754a1aa49c4f6d3843 (patch)
tree274ab53d1ae628e8b02979fedb76ec901d825a52
parent083abdf67f157e9d2ab5a8c9d5e71240479d3c99 (diff)
Add PTH test case for <rdar://problem/8227989>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109555 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/PCH/pth.c7
-rw-r--r--test/PCH/pth.h12
2 files changed, 19 insertions, 0 deletions
diff --git a/test/PCH/pth.c b/test/PCH/pth.c
new file mode 100644
index 0000000000..1262f8aebd
--- /dev/null
+++ b/test/PCH/pth.c
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-pth -o %t %S/pth.h
+// RUN: %clang_cc1 -triple i386-unknown-unknown -include-pth %t -fsyntax-only %s 2>&1 | FileCheck %s
+
+#error This is the only diagnostic
+
+// CHECK: This is the only diagnostic
+// CHECK: 1 error generated. \ No newline at end of file
diff --git a/test/PCH/pth.h b/test/PCH/pth.h
new file mode 100644
index 0000000000..9ae7021a5e
--- /dev/null
+++ b/test/PCH/pth.h
@@ -0,0 +1,12 @@
+// This case came up when using PTH with Boost (<rdar://problem/8227989>).
+
+# ifndef R8227989_PREPROCESSOR_CONFIG_CONFIG_HPP
+# ifndef R8227989_PP_CONFIG_FLAGS
+# endif
+#
+# ifndef R8227989_PP_CONFIG_ERRORS
+# ifdef NDEBUG
+# endif
+# endif
+# endif
+