The before and after selectors allow users to specify a zero-length range -- a point -- at the relevant location in an AST-node's source. Point ranges can be useful, for example, to insert a change using an API that takes a range to be modified (e.g. tooling::change()).
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 32475 Build 32474: arc lint + arc unit
Event Timeline
Comment Actions
LGTM!
clang/lib/Tooling/Refactoring/RangeSelector.cpp | ||
---|---|---|
124 | Ah, we're so lucky to have the source manager here! | |
clang/unittests/Tooling/RangeSelectorTest.cpp | ||
130 | NIT: Consider using llvm::Annotations from llvm/Testing/Support, they might help to produce more readable tests. No need to change anything in this revision, obviously. |
Ah, we're so lucky to have the source manager here!
It did not occur to me that having MatchResult means we also have access to all helper structs we need