ioeric added inline comments.

================
Comment at: clangd/index/SymbolCollector.cpp:631
+
+bool SymbolCollector::isSelfContainedHeader(FileID FID) {
+  // The real computation (which will be memoized).
----------------
sammccall wrote:
> ioeric wrote:
> > sammccall wrote:
> > > this has been moved to a member so it can use the cache and the 
> > > (non-threadsafe) regex, and its logic has obviously been changed.
> > "self-contained header" doesn't sound accurate anymore. Maybe something 
> > like `isIncludable`?
> Let me explain how I think about it, and then I'll change the name if you 
> still don't think it fits.
> 
> What we're detecting here (usually) is that this header can't be included 
> unless a certain symbol/state is defined first from the outside.
> Whether that's for some direct technical reason (e.g. configuration is 
> needed) or to enforce a coding style, the dependency on external preprocessor 
> state means the header isn't self contained. (And the non-self-containedness 
> is the reason we can't include it in arbitrary contexts) 
That sounds good. Thanks for explaining!


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D60815



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

Reply via email to