blob: 567575346ce17d56f6a298ee1f6131723546b667 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// Test with pch.
// RUN: %clang_cc1 -emit-pch -DFOO -o %t %S/variables.h
// RUN: %clang_cc1 -DBAR=int -include-pch %t -fsyntax-only -pedantic %s
// RUN: %clang_cc1 -DFOO -DBAR=int -include-pch %t -Werror %s
// RUN: not %clang_cc1 -DFOO -DBAR=int -DX=5 -include-pch %t -Werror %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
|