[PATCH] D125403: [Serialization] Delta-encode consecutive SourceLocations in TypeLoc

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 19 00:25:15 PDT 2022


sammccall marked an inline comment as done.
sammccall added inline comments.


================
Comment at: clang/include/clang/Serialization/SourceLocationEncoding.h:144
+  // enclosing sequence instead of establishing a new one.
+  Root(SourceLocationSequence *Parent = nullptr)
+      : Seq(Parent ? Parent->State : State) {}
----------------
ilya-biryukov wrote:
> NIT: Naming feels a bit confusing here.
> `Root` that may have `Parent` seems a bit weird to me conceptually.
> 
> One idea that I have in mind is `Sequence::State` that allows to continue an existing sequence or establish a new one. Note that we will need to do something about the clashing private member.
Fair enough. Renamed Root -> State, and State -> Prev.
(Prev is not a great name, but it's private with small scope)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125403



More information about the cfe-commits mailing list