[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Modules / implicit-module-with-missing-path.cpp
blobd167f742e7b21ec823eb95106084f8c0c887adc5
1 // This tests that the compiler wouldn't crash if the module path misses
3 // RUN: rm -rf %t
4 // RUN: mkdir -p %t/subdir
5 // RUN: echo "export module C;" >> %t/subdir/C.cppm
6 // RUN: echo -e "export module B;\nimport C;" >> %t/B.cppm
7 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/subdir/C.cppm -o %t/subdir/C.pcm
8 // RUN: %clang_cc1 -std=c++20 -emit-module-interface -fprebuilt-module-path=%t/subdir %t/B.cppm -o %t/B.pcm
9 // RUN: %clang_cc1 -std=c++20 -fmodule-file=B=%t/B.pcm %s -fsyntax-only -verify
11 import B; // expected-error {{failed to find module file for module 'C'}}
12 import C; // expected-error {{module 'C' not found}}