HighCommander4 wrote:

A somewhat narrow use case where this approach might be workable is unity 
builds (groups of source files batched together to be compiled as a single 
translation unit for build performance).

That's a situation where the non-self-contained files of interest (the 
individual source files that are included in such a batch) have precisely one 
includer, their incoming preprocessor state can be replicated precisely using 
`-include` flags, and the intervention can be limited to them (it wouldn't 
apply to header files).

Of course, the including file is not likely to be open in this case, so we'd 
want something like an include graph stored in the index (as proposed in #123) 
to consult.

https://github.com/llvm/llvm-project/pull/72479
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to