[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Modules / load_failure.c
blob662b39b6f1874f8f145213d1ad63508f36ac4b22
1 #ifdef NONEXISTENT
2 @import load_nonexistent;
3 #endif
5 #ifdef FAILURE
6 @import load_failure;
7 #endif
9 // RUN: rm -rf %t
10 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -fmodules-cache-path=%t -fdisable-module-hash -emit-module -fmodule-name=load_failure %S/Inputs/module.modulemap
11 // RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -I %S/Inputs -fdisable-module-hash %s -DNONEXISTENT 2>&1 | FileCheck -check-prefix=CHECK-NONEXISTENT %s
12 // CHECK-NONEXISTENT: load_failure.c:2:9: fatal error: module 'load_nonexistent' not found
14 // RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -I %S/Inputs -fdisable-module-hash %s -DFAILURE 2> %t.out
15 // RUN: FileCheck -check-prefix=CHECK-FAILURE %s < %t.out
17 // FIXME: Clean up diagnostic text below and give it a location
18 // CHECK-FAILURE: error: C99 was disabled in AST file '{{.*}}load_failure.pcm' but is currently enabled
19 // FIXME: When we have a syntax for modules in C, use that.