2009-04-29 02:58:38 +08:00
|
|
|
// Test with pch.
|
2009-12-16 04:14:24 +08:00
|
|
|
// 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
|
2009-04-29 02:58:38 +08:00
|
|
|
|
|
|
|
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
|