15 lines · cpp
1 2// RUN: rm -rf %t3// RUN: mkdir -p %t4// RUN: split-file %s %t5//6// RUN: %clang_cc1 -std=c++20 %t/dummy.cppm -emit-module-interface -o %t/dummy.pcm7// RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t -verify %t/test.cpp8 9 10//--- dummy.cppm11export module dummy;12 13//--- test.cpp14export import dummy; // expected-error {{export declaration can only be used within a module interface}}15