diff options
Diffstat (limited to 'clang/test/PCH/fuzzy-pch.c')
| -rw-r--r-- | clang/test/PCH/fuzzy-pch.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/PCH/fuzzy-pch.c b/clang/test/PCH/fuzzy-pch.c new file mode 100644 index 00000000000..ce4634d756b --- /dev/null +++ b/clang/test/PCH/fuzzy-pch.c @@ -0,0 +1,17 @@ +// 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 + +BAR bar = 17; + +#ifndef FOO +# error FOO was not defined +#endif + +#if FOO != 1 +# error FOO has the wrong definition +#endif + +#ifndef BAR +# error BAR was not defined +#endif |

