clang/test/Modules/cxx20-export-import.cpp
raw| 1 | |
| 2 | // RUN: rm -rf %t |
| 3 | // RUN: mkdir -p %t |
| 4 | // RUN: split-file %s %t |
| 5 | // |
| 6 | // RUN: %clang_cc1 -std=c++20 %t/dummy.cppm -emit-module-interface -o %t/dummy.pcm |
| 7 | // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t -verify %t/test.cpp |
| 8 | |
| 9 | |
| 10 | //--- dummy.cppm |
| 11 | export module dummy; |
| 12 | |
| 13 | //--- test.cpp |
| 14 | export import dummy; // expected-error {{export declaration can only be used within a module interface}} |