Now that pragma comment and pragma detect_mismatch are implemented, this might just work. Some pragmas aren't serialized yet (from the top of my head: code_seg, bss_seg, data_seg, const_seg, init_seg, section, vtordisp), but these are as far as I know usually pushed and popped within the header and usually don't leak out. If it turns out the current PCH support isn't good enough yet, we can turn it off again. llvm-svn: 262749
16 lines
573 B
C++
16 lines
573 B
C++
// Note: %s and %S must be preceded by --, otherwise it may be interpreted as a
|
|
// command-line option, e.g. on Mac where %s is commonly under /Users.
|
|
|
|
// /Yc but pch generation fails => main file not compiled
|
|
// This is a separate file since executing this failure path requires
|
|
// code generation, which makes this test require an x86 backend.
|
|
// REQUIRES: x86-registered-target
|
|
|
|
// RUN: not %clang_cl -Werror /Yc%S/Inputs/pchfile.h /FI%S/Inputs/pchfile.h /Fp%t.pch /c -DERR_HEADER -- %s 2>&1 \
|
|
// RUN: | FileCheck %s
|
|
|
|
// CHECK: nope1
|
|
// CHECK-NOT: nope2
|
|
|
|
#error nope2
|