[PATCH] D36156: [rename] Introduce symbol occurrences

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 2 05:18:35 PDT 2017


arphaman added inline comments.


================
Comment at: include/clang/Tooling/Refactoring/Rename/SymbolOccurrences.h:65-68
+  ArrayRef<SourceLocation> getNameLocations() const { return Locations; }
+  ArrayRef<unsigned> getNameLengths() const {
+    return llvm::makeArrayRef(NameLengths, Locations.size());
+  }
----------------
arphaman wrote:
> klimek wrote:
> > Any reason not to return ranges instead here?
> I used ranges before, but I found that it was easier to create the atomic changes with location+lengths. Should I go back to ranges?
Oops, this is embarrassing! I didn't realize that `AtomicChange` had an additional overload that accepted `CharSourceRange`. I'll go back to ranges.


Repository:
  rL LLVM

https://reviews.llvm.org/D36156





More information about the cfe-commits mailing list