[PATCH] D154962: [clangd] Use canonical path as resolved path for includes.

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 11 06:44:14 PDT 2023


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


================
Comment at: clang-tools-extra/clangd/Headers.cpp:57-61
+      auto CanonicalPath =
+          File ? getCanonicalPath(File->getFileEntry().getLastRef(),
+                                  SM.getFileManager())
+               : std::nullopt;
+      Inc.Resolved = std::string(CanonicalPath ? *CanonicalPath : "");
----------------
`File` is already a `OptionalFileEntryRef`, no need to go to a `FileEntry` and back into a `FileEntryRef`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154962



More information about the cfe-commits mailing list