[PATCH] D128328: [C++20][Modules] Improve handing of Private Module Fragment diagnostics.

Iain Sandoe via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 27 05:25:13 PDT 2022


iains planned changes to this revision.
iains added a comment.

In D128328#3611194 <https://reviews.llvm.org/D128328#3611194>, @ChuanqiXu wrote:

> 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.

Indeed.

> 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.

So I will re-work this patch to deal with the two changes (I think that the proposed merge of changes to the example should be enough to go on).


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