[PATCH] D81964: [clangd] Make use of preamble bounds from the patch inside ReplayPreamble
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 17 08:36:35 PDT 2020
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:220
std::vector<TextualPPDirective> TextualDirectives;
+ PreambleBounds Bounds = {0, false};
};
----------------
nit: = {} again
================
Comment at: clang-tools-extra/clangd/Preamble.cpp:288
ScannedPreamble SP;
+ SP.Bounds = std::move(Bounds);
PP.addPPCallbacks(
----------------
(we know these are trivial structs, could drop move)
================
Comment at: clang-tools-extra/clangd/Preamble.h:123
+ /// Returns preamble bounds for the current version of the file.
+ PreambleBounds preambleBounds() const { return PatchBounds; }
----------------
current -> Modified
I'd suggest calling this modifiedBounds()
================
Comment at: clang-tools-extra/clangd/Preamble.h:136
std::vector<Inclusion> PreambleIncludes;
+ PreambleBounds PatchBounds = {0, false};
};
----------------
nit: = {} seems less confusing.
Call this ModifiedBounds (or ModifiedPreambleBounds) as well? Not obvious to me what it is at the moment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81964/new/
https://reviews.llvm.org/D81964
More information about the cfe-commits
mailing list