llvm-capstone/clang/test/Modules/cxx20-export-import.cpp
Chuanqi Xu 574ee1c02e [C++20] [Modules] Prevent to accept clang modules
Close https://github.com/llvm/llvm-project/issues/64755

This wouldn't affect the form @import as the test shows. The two
affected test case `diag-flags.cpp` and `diag-pragma.cpp` are old test
cases in 2017 and 2018, when we're not so clear about the direction of
modules. And the things that these 2 tests tested can be covered by
clang modules naturally. So I change the them into clang modules to
not block this patch.
2023-08-17 11:45:50 +08:00

15 lines
385 B
C++

// RUN: rm -rf %t
// RUN: mkdir -p %t
// RUN: split-file %s %t
//
// RUN: %clang_cc1 -std=c++20 %t/dummy.cppm -emit-module-interface -o %t/dummy.pcm
// RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t -verify %t/test.cpp
//--- dummy.cppm
export module dummy;
//--- test.cpp
export import dummy; // expected-error {{export declaration can only be used within a module purview}}