blob: 567575346ce17d56f6a298ee1f6131723546b667 [file] [log] [blame]
Douglas Gregore721f952009-04-28 18:58:38 +00001// Test with pch.
Daniel Dunbara5728872009-12-15 20:14:24 +00002// RUN: %clang_cc1 -emit-pch -DFOO -o %t %S/variables.h
3// RUN: %clang_cc1 -DBAR=int -include-pch %t -fsyntax-only -pedantic %s
4// RUN: %clang_cc1 -DFOO -DBAR=int -include-pch %t -Werror %s
5// RUN: not %clang_cc1 -DFOO -DBAR=int -DX=5 -include-pch %t -Werror %s
Douglas Gregore721f952009-04-28 18:58:38 +00006
7BAR bar = 17;
8
9#ifndef FOO
10# error FOO was not defined
11#endif
12
13#if FOO != 1
14# error FOO has the wrong definition
15#endif
16
17#ifndef BAR
18# error BAR was not defined
19#endif