kadircet added a comment.

> I had another idea about offering the export pragma when in a header file but 
> I don't know if that's going too far

There are definitely cases where this is conceptually "right" fix, but it's 
hard to guess that in clangd (well at least without having some codebase wide 
analysis), and offering it all the time would definitely confuse users.

> One of the main issues I have is due to templates not being instantiated 
> which can result in symbols that are actually used not being picked up as the 
> template instantiation that uses them isn't actually instantiated.

I guess you're talking about having the template pattern in the main file, but 
all the instantiations are in dependents of the code. My mental model was 
around making the dependents have the include for the type, instead of having 
it in the file providing the template pattern (header).  Does that make sense?
This kind of breaks down when there's actually some types used by all the 
instantiations, as you'd want them to be included by the header. But I think we 
should be able to diagnose these cases, as usage of this type should be 
non-dependent (at least in the cases I can think of), so this sounds like a 
bug/improvement.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128204/new/

https://reviews.llvm.org/D128204

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to