]> granicus.if.org Git - clang/commit
[libTooling] Add `access` and `ifBound` combinators to Stencil library.
authorYitzhak Mandelbaum <yitzhakm@google.com>
Mon, 23 Sep 2019 13:21:42 +0000 (13:21 +0000)
committerYitzhak Mandelbaum <yitzhakm@google.com>
Mon, 23 Sep 2019 13:21:42 +0000 (13:21 +0000)
commitaa8d712ffccff9badf5a4313c271be6d0bb34399
treee6597dd4d762d20eea480749b304f0b7fe68c690
parent5612ffc5207ce1d757bfad8265452ffdc589d243
[libTooling] Add `access` and `ifBound` combinators to Stencil library.

Summary:
This revision add the `access` and `ifBound` combinators to the Stencil library:
* `access` -- constructs an idiomatic expression for accessing a member (a
  `MemberExpr`).
* `ifBound` -- chooses between two `StencilParts` based on the whether an id is
  bound in the match (corresponds to the combinator of the same name in
  RangeSelector).

Reviewers: gribozavr

Subscribers: cfe-commits

Tags: #clang

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

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