sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/clangd/Headers.cpp:111
+        // If a self-contained header is included recursively it will get
+        // different FileIDs each time. Only the last result of
+        // isSelfContainedHeader is reliable, so we should remove the header
----------------
second sentence just echoes the code: say why, not what

isSelfContainedHeader only returns true once the full header-guard structure 
has been seen, i.e. when exiting the *outer* copy of the file. So last result 
wins.


================
Comment at: clang-tools-extra/clangd/Headers.cpp:115
+        // wasn't one.
         if (!isSelfContainedHeader(FE, PrevFID, SM, HeaderInfo))
           Out->NonSelfContained.insert(
----------------
nit: reverse the if condition to avoid double-negative.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124166

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

Reply via email to