[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Driver / modulemap-allow-subdirectory-search.c
blobee993a75b5272802d8682f87cba8573806baf4b8
1 // RUN: rm -rf %t
2 // RUN: split-file %s %t
4 // Check that with a sufficiently new SDK not searching for module maps in subdirectories.
6 // New SDK.
7 // RUN: %clang -target x86_64-apple-macos10.13 -isysroot %t/MacOSX15.0.sdk -fmodules %t/test.c -### 2>&1 \
8 // RUN: | FileCheck --check-prefix=NO-SUBDIRECTORIES %t/test.c
9 // Old SDK.
10 // RUN: %clang -target x86_64-apple-macos10.13 -isysroot %t/MacOSX14.0.sdk -fmodules %t/test.c -### 2>&1 \
11 // RUN: | FileCheck --check-prefix=SEARCH-SUBDIRECTORIES %t/test.c
12 // Non-Darwin platform.
13 // RUN: %clang -target i386-unknown-linux -isysroot %t/MacOSX15.0.sdk -fmodules %t/test.c -### 2>&1 \
14 // RUN: | FileCheck --check-prefix=SEARCH-SUBDIRECTORIES %t/test.c
15 // New SDK overriding the default.
16 // RUN: %clang -target x86_64-apple-macos10.13 -isysroot %t/MacOSX15.0.sdk -fmodules %t/test.c -fmodulemap-allow-subdirectory-search -### 2>&1 \
17 // RUN: | FileCheck --check-prefix=SEARCH-SUBDIRECTORIES %t/test.c
19 //--- test.c
20 // NO-SUBDIRECTORIES: "-fno-modulemap-allow-subdirectory-search"
21 // SEARCH-SUBDIRECTORIES-NOT: "-fno-modulemap-allow-subdirectory-search"
23 //--- MacOSX15.0.sdk/SDKSettings.json
24 {"Version":"15.0", "MaximumDeploymentTarget": "15.0.99"}
26 //--- MacOSX14.0.sdk/SDKSettings.json
27 {"Version":"14.0", "MaximumDeploymentTarget": "14.0.99"}