[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / Modules / implicit-module-with-missing-path.cpp
blob851a4401df0b6c7f011c5f82d0b22f71648b3d9f
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 -fprebuilt-module-path=%t %s -fsyntax-only -verify -Wno-read-modules-implicitly
11 import B;
12 import C; // expected-error {{module 'C' is needed but has not been provided, and implicit use of module files is disabled}}