[PATCH] D128328: [C++20][Modules] Improve handing of Private Module Fragment diagnostics.
Chuanqi Xu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 26 19:09:06 PDT 2022
ChuanqiXu added a comment.
>From the discussion, it looks like the 'export' part is not necessary here and we don't need to care about linkage in this revision.
In D128328#3609827 <https://reviews.llvm.org/D128328#3609827>, @vsapsai wrote:
> Sorry for changing my mind. I've thought about the errors more and especially about the case mentioned by Chuanqi
>
> export module A;
> [export] inline void func();
>
> I'm afraid it can complicate the implementation but we can achieve some consistency with errors like
>
> export module A;
> export inline void func(); // error: no definition for exported inline function 'func' in module 'A'
>
> and
>
> export module A;
> export inline void func(); // error: no definition for exported inline function 'func' in module 'A'
> //...
> module :private;
> void func() {} // note: definition here is not reachable as it is private
>
> I think it is useful to have connection between declaration and definition and to explain why the definition is no good.
>
> Specific wording around "no definition | missing definition | definition required" is flexible.
It makes sense to me.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128328/new/
https://reviews.llvm.org/D128328
More information about the cfe-commits
mailing list