aboutsummaryrefslogtreecommitdiff
path: root/clang/test/PCH/fuzzy-pch.c
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-28 20:33:11 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-28 20:33:11 +0000
commite6648fb79e9e112098c57fdd7396a21583e2f32b (patch)
tree4eb3bfd3005c0b468442839b813ec6c3efa7f627 /clang/test/PCH/fuzzy-pch.c
parentab4df58193b60455286db0cd4ad3e67b535cd3d6 (diff)
downloadllvm-e6648fb79e9e112098c57fdd7396a21583e2f32b.zip
llvm-e6648fb79e9e112098c57fdd7396a21583e2f32b.tar.gz
llvm-e6648fb79e9e112098c57fdd7396a21583e2f32b.tar.bz2
Implement checking for macro definitions that occur on the command
line when using a PCH that were not provided when building the PCH file. If those names were used as identifiers somewhere in the PCH file, reject the PCH file. llvm-svn: 70321
Diffstat (limited to 'clang/test/PCH/fuzzy-pch.c')
-rw-r--r--clang/test/PCH/fuzzy-pch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/test/PCH/fuzzy-pch.c b/clang/test/PCH/fuzzy-pch.c
index ce4634d7..2ddcb8b 100644
--- a/clang/test/PCH/fuzzy-pch.c
+++ b/clang/test/PCH/fuzzy-pch.c
@@ -1,6 +1,8 @@
// Test with pch.
// RUN: clang-cc -emit-pch -DFOO -o %t %S/variables.h &&
-// RUN: clang-cc -DBAR=int -include-pch %t -fsyntax-only -pedantic %s
+// RUN: clang-cc -DBAR=int -include-pch %t -fsyntax-only -pedantic %s &&
+// RUN: clang-cc -DFOO -DBAR=int -include-pch %t -Werror %s &&
+// RUN: not clang-cc -DFOO -DBAR=int -DX=5 -include-pch %t -Werror %s
BAR bar = 17;