2 // 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 %s
5 // RUN: not %clang_cc1 -DFOO=blah -DBAR=int -include-pch %t %s 2> %t.err
6 // RUN: FileCheck -check-prefix=CHECK-FOO %s < %t.err
7 // RUN: not %clang_cc1 -UFOO -include-pch %t %s 2> %t.err
8 // RUN: FileCheck -check-prefix=CHECK-NOFOO %s < %t.err
10 // RUN: not %clang_cc1 -DFOO -undef -include-pch %t %s 2> %t.err
11 // RUN: FileCheck -check-prefix=CHECK-UNDEF %s < %t.err
16 # error FOO was not defined
20 # error FOO has the wrong definition
24 # error BAR was not defined
27 // CHECK-FOO: definition of macro 'FOO' differs between the AST file '{{.*}}' ('1') and the command line ('blah')
28 // CHECK-NOFOO: macro 'FOO' was defined in the AST file '{{.*}}' but undef'd on the command line
30 // CHECK-UNDEF: command line contains '-undef' but AST file '{{.*}}' was not built with it