[PATCH] D109880: [clangd] PreamblePatch should be no-op if includes arent patched

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 16 07:29:55 PDT 2021


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


================
Comment at: clang-tools-extra/clangd/Preamble.cpp:462
       BaselineScan->TextualDirectives != ModifiedScan->TextualDirectives;
-  if (!IncludesChanged && !DirectivesChanged)
+  if ((PatchType != PatchType::All || !IncludesChanged) && !DirectivesChanged)
     return PreamblePatch::unmodified(Baseline);
----------------
I think `=MacroDirectives` would be significantly clearer than `!=All`, and a little less fragile


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109880



More information about the cfe-commits mailing list