[PATCH] D117056: [clangd] Properly compute framework-style include spelling

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 26 00:55:22 PST 2022


sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.

Thanks! LG with a couple of optional nits.
Cut should be on 2022-02-01 or thereabouts, best to land after that if it's not a problem.



================
Comment at: clang-tools-extra/clangd/index/SymbolCollector.cpp:315
+    }
+    llvm::vfs::Status Status;
+    bool IsSystem = isSystem(HeadersDirKind);
----------------
nit: move next to first use


================
Comment at: clang-tools-extra/clangd/index/SymbolCollector.cpp:320
+
+    auto StatErr = HS.getFileMgr().getNoncachedStatValue(UmbrellaPath, Status);
+    if (!StatErr) {
----------------
now that we're filling in a couple of fields for a whole cache entry, probably worth pulling out a function just for that. That will also naturally eliminate the duplicate returns here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117056



More information about the cfe-commits mailing list