[PATCH] D143197: [clangd] Fix bugs in main-file include patching for stale preambles

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 8 03:24:08 PST 2023


kadircet added inline comments.


================
Comment at: clang-tools-extra/clangd/Preamble.cpp:690
+        // it's coming from baseline preamble.
+        if (It->second) {
+          Inc.Resolved = It->second->Resolved;
----------------
sammccall wrote:
> why the null check?
as discussed offline, we might have includes coming from scanned contents whose are not part of the preamble, e.g. because they're in a disabled PP region.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143197



More information about the cfe-commits mailing list