mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-14 01:46:41 +00:00

Close https://github.com/llvm/llvm-project/issues/62707 As we discussed before, we'll forbid the use of implicit generated path for C++20 modules. And as I mentioned in https://github.com/llvm/llvm-project/issues/62707, we've emitted a warning for clang17 and we'll make it a hard error in clang18. And the patch addresses the decision.
13 lines
635 B
C++
13 lines
635 B
C++
// This tests that the compiler wouldn't crash if the module path misses
|
|
|
|
// RUN: rm -rf %t
|
|
// RUN: mkdir -p %t/subdir
|
|
// RUN: echo "export module C;" >> %t/subdir/C.cppm
|
|
// RUN: echo -e "export module B;\nimport C;" >> %t/B.cppm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/subdir/C.cppm -o %t/subdir/C.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface -fprebuilt-module-path=%t/subdir %t/B.cppm -o %t/B.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -fmodule-file=B=%t/B.pcm %s -fsyntax-only -verify
|
|
|
|
import B; // expected-error {{failed to find module file for module 'C'}}
|
|
import C; // expected-error {{module 'C' not found}}
|