
Close https://github.com/llvm/llvm-project/issues/98583 Currently, clang will reject the following code: ``` export module mod; extern "C++" void func(); export extern "C++" { void func(); } ``` while both MSVC and GCC accept it. Although clang's behavior matches the current wording, from the discussion, the consensus is that we should accept the above example from the intention. Since the intention to not allow export redeclaration which is not exported is to make the linkage clear. But it doesn't matter with the declarations within global module.
9 lines
169 B
C++
9 lines
169 B
C++
// RUN: %clang_cc1 -std=c++20 %s -verify -fsyntax-only
|
|
|
|
// expected-no-diagnostics
|
|
export module mod;
|
|
extern "C++" void func();
|
|
export extern "C++" {
|
|
void func();
|
|
}
|