blob: 6af3b4c7c3709340b8d4bc743987051265ef16ac [file] [log] [blame]
Argyrios Kyrtzidis3b7deda2013-05-24 05:44:08 +00001// RUN: rm -rf %t
2// RUN: mkdir %t
3// RUN: touch %t/Module.pcm
4// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t %s -fdisable-module-hash -F %S/Inputs -verify
5// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t %s -fdisable-module-hash -F %S/Inputs -DIMPLICIT -verify
6
7// This tests that after a fatal module loader error, we do not continue parsing.
8
9#ifdef IMPLICIT
10
11// expected-error@+1{{does not appear to be}}
12#import <Module/Module.h>
13#pragma clang __debug crash;
14
15#else
16
17// expected-error@+1{{does not appear to be}}
18@import Module;
19#pragma clang __debug crash;
20
21#endif
22
23// Also check that libclang does not create a PCH with such an error.
Rafael Espindola96e78132013-07-04 16:16:58 +000024// RUN: not c-index-test -write-pch %t.pch -fmodules -fmodules-cache-path=%t \
25// RUN: %s -Xclang -fdisable-module-hash -F %S/Inputs 2>&1 | FileCheck %s
Argyrios Kyrtzidis3b7deda2013-05-24 05:44:08 +000026// CHECK: Unable to write PCH file