ArcsinX wrote:

> I failed to understand your intention with the example. Why do you think this 
> is a problem? I didn't think about this

I am just trying to say, that If we support includes in the middle of the file 
(I believe we must), then this patch should works correctly, because roughly 
speaking it acts like we have an empty preamble and all headers are in the 
middle of the file.

So, if scenarios with includes in the middle of the file doesn't work for you, 
we need to investigate this first.

> 
> > For me at `vvv` modifications, hover at `mm` shows correct modified value.
> 
> I just tried it:
> 
> <img alt="image" width="2000" height="1620" 
> src="https://private-user-images.githubusercontent.com/68680648/571165771-6d69a39d-6458-4956-a40c-44ac823296f9.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzQ4NTU4NTYsIm5iZiI6MTc3NDg1NTU1NiwicGF0aCI6Ii82ODY4MDY0OC81NzExNjU3NzEtNmQ2OWEzOWQtNjQ1OC00OTU2LWE0MGMtNDRhYzgyMzI5NmY5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzMwVDA3MjU1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU5YzMwOTI1OGFkODQ1N2I5NGRmYzRiNDhmNmQzZjExMTZiYmViMzM5YTMyYjQ2MjdkN2NmODUzNTkzMmNmYmUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.icG9hcOVyhmUIV72n2yy0hL_LWlJnobqMW2PiR-0Qcc";>
> The source code is here: 
> https://github.com/alibaba/async_simple/tree/CXX20Modules
> 
> And the reason why I think the current approach is problematic is, the 
> current approach simply breaks the design of the `CanReuse` interface. I 
> can't believe it can work properly with the `CanReuse` interface otherwise we 
> should remove `CanReuse`.

With this patch preamble is empty, in general it doesn't matter can it be 
reused it or not, because all includes are in the file body and not a part of 
preamble.
Can you please provide a minimal example to reproduce the problem? Currently I 
have no plans to download repos to check this. You provided examples above an 
with this I don't see any problems and can't see the reason why this can't work


https://github.com/llvm/llvm-project/pull/189284
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to