]> granicus.if.org Git - clang/commit
[libTooling] Add `ifBound`, `elseBranch` RangeSelector combinators.
authorYitzhak Mandelbaum <yitzhakm@google.com>
Fri, 20 Sep 2019 17:11:03 +0000 (17:11 +0000)
committerYitzhak Mandelbaum <yitzhakm@google.com>
Fri, 20 Sep 2019 17:11:03 +0000 (17:11 +0000)
commit2ecd583adaae907d88e4f544ed62939a8103e968
tree56cf60cdc5649431a4bdc9c8f640f9798728cf94
parent5765299b76e9098d2c84c69178b4ccfdb6c23bc0
[libTooling] Add `ifBound`, `elseBranch` RangeSelector combinators.

Summary:
Adds two new combinators and corresponding tests to the RangeSelector library.
* `ifBound` -- conditional evaluation of range-selectors, based on whether a
   given node id is bound in the match.
* `elseBranch` -- selects the source range of the else and its statement.

Reviewers: gribozavr

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D67621

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372410 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Tooling/Refactoring/RangeSelector.h
lib/Tooling/Refactoring/RangeSelector.cpp
unittests/Tooling/RangeSelectorTest.cpp