[PATCH] D114370: [clangd] Record information about non self-contained headers in IncludeStructure

Kirill Bobyrev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 26 04:23:30 PST 2021


kbobyrev added inline comments.


================
Comment at: clang-tools-extra/clangd/Headers.h:167
 
+  void recordNonSelfContained(HeaderID ID) { NonSelfContained.insert(ID); }
+
----------------
sammccall wrote:
> could consider `friend class RecordHeaders`, either is ugly, up to you
That was the original problem I had the public field in the previous iteration: `RecordHeaders` is defined in anonymous namespace, so IIUC I can not friend it from here unless I make it a subclass or somehow visible from here, otherwise it wouldn't work, would it? Is there any clean way to do the `friend` here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114370



More information about the cfe-commits mailing list