llvm-capstone/clang/test/Modules/export-in-another-export.cppm
Chuanqi Xu f8d5f0e53b [NFC] Add two tests for C++ modules
One test for checking the decls in language linkage shouldn't be
discarded and can be mangled correctly.

Another one for checking we can't export again in an export decl.
2023-02-16 17:02:04 +08:00

6 lines
248 B
C++

// RUN: %clang_cc1 -std=c++20 %s -fsyntax-only -verify
export module M;
export { // expected-note {{export block begins here}}
export int foo() { return 43; } // expected-error {{export declaration appears within another export declaration}}
}