[PATCH] D36156: [rename] Introduce symbol occurrences
Alex Lorenz via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 2 04:56:36 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());
+ }
----------------
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?
================
Comment at: include/clang/Tooling/Refactoring/Rename/SymbolOccurrences.h:72-73
+ OccurrenceKind Kind;
+ ArrayRef<SourceLocation> Locations;
+ const unsigned *NameLengths;
+};
----------------
klimek wrote:
> Can we store ranges instead?
We could, but see above for my current reasoning.
Repository:
rL LLVM
https://reviews.llvm.org/D36156
More information about the cfe-commits
mailing list