This revision was automatically updated to reflect the committed changes.
Closed by commit rL310853: [rename] Introduce symbol occurrences (authored by
arphaman).
Changed prior to commit:
https://reviews.llvm.org/D36156?vs=110964&id=110999#toc
Repository:
rL LLVM
https://reviews.llvm.org/D3
hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.
LGTM.
Comment at: include/clang/Tooling/Refactoring/Rename/SymbolName.h:19
+namespace clang {
+namespace tooling {
+
arphaman wrote:
> hokein wrote:
> > An o
arphaman updated this revision to Diff 110964.
arphaman marked an inline comment as done.
arphaman added a comment.
Use `takeOccurrences`
Repository:
rL LLVM
https://reviews.llvm.org/D36156
Files:
include/clang/Tooling/Refactoring/Rename/RenamingAction.h
include/clang/Tooling/Refactoring
arphaman marked an inline comment as done.
arphaman added inline comments.
Comment at: lib/Tooling/Refactoring/Rename/USRLocFinder.cpp:398
Visitor.TraverseDecl(Decl);
- return Visitor.getLocationsFound();
+ return std::move(Visitor.getOccurrences());
}
hoke
hokein added inline comments.
Comment at: lib/Tooling/Refactoring/Rename/SymbolOccurrences.cpp:17
+
+SymbolOccurrence::SymbolOccurrence(const SymbolName &Name, OccurrenceKind Kind,
+ ArrayRef Locations)
arphaman wrote:
> hokein w
arphaman updated this revision to Diff 110954.
arphaman marked an inline comment as done.
arphaman added a comment.
Address review comments.
Repository:
rL LLVM
https://reviews.llvm.org/D36156
Files:
include/clang/Tooling/Refactoring/Rename/RenamingAction.h
include/clang/Tooling/Refactor
arphaman marked 5 inline comments as done.
arphaman added inline comments.
Comment at: include/clang/Tooling/Refactoring/Rename/SymbolName.h:19
+namespace clang {
+namespace tooling {
+
hokein wrote:
> An off-topic thought: currently we put everything into `clang
hokein added a comment.
Sorry for the delay. The code looks good roughly, a few nits below.
Comment at: include/clang/Tooling/Refactoring/Rename/SymbolName.h:19
+namespace clang {
+namespace tooling {
+
An off-topic thought: currently we put everything into `cl
arphaman added a comment.
Ping.
Repository:
rL LLVM
https://reviews.llvm.org/D36156
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
arphaman updated this revision to Diff 109326.
arphaman added a comment.
Address review comments.
Repository:
rL LLVM
https://reviews.llvm.org/D36156
Files:
include/clang/Tooling/Refactoring/Rename/RenamingAction.h
include/clang/Tooling/Refactoring/Rename/SymbolName.h
include/clang/Too
arphaman added inline comments.
Comment at: include/clang/Tooling/Refactoring/Rename/SymbolOccurrences.h:65-68
+ ArrayRef getNameLocations() const { return Locations; }
+ ArrayRef getNameLengths() const {
+return llvm::makeArrayRef(NameLengths, Locations.size());
+ }
-
arphaman added inline comments.
Comment at: include/clang/Tooling/Refactoring/Rename/SymbolOccurrences.h:65-68
+ ArrayRef getNameLocations() const { return Locations; }
+ ArrayRef getNameLengths() const {
+return llvm::makeArrayRef(NameLengths, Locations.size());
+ }
-
klimek added inline comments.
Comment at: include/clang/Tooling/Refactoring/Rename/SymbolOccurrences.h:32
+/// a macro expansion.
+class SymbolOccurrence {
+public:
I understand the exact vs. non-exact idea, but can you expand a bit on how
Obj-C code looks where
kimgr added a comment.
I was about to suggest SymbolLocation or even SymbolLoc, but it appears to keep
track of more than locations. "Reference" sounds a little open-ended. No more
ideas here, I'm afraid.
Repository:
rL LLVM
https://reviews.llvm.org/D36156
___
arphaman added a comment.
In https://reviews.llvm.org/D36156#827733, @kimgr wrote:
> High-level comment from the peanut gallery:
>
> The word "occurrences" is horrible to type and most people misspell it (you
> did great here!) Would you consider something like "SymbolMatches" or even
> "Symbol
kimgr added a comment.
High-level comment from the peanut gallery:
The word "occurrences" is horrible to type and most people misspell it (you did
great here!) Would you consider something like "SymbolMatches" or even
"SymbolHits"?
Repository:
rL LLVM
https://reviews.llvm.org/D36156
___
arphaman created this revision.
Herald added a subscriber: mgorny.
Symbol occurrences store the results of local rename and will also be used for
the global, indexed rename results. They can be converted to a set of
`AtomicChanges` as well. This is a preparation patch for both the support of
mu
17 matches
Mail list logo