[libTooling] Add various Stencil combinators for expressions.
authorYitzhak Mandelbaum <yitzhakm@google.com>
Thu, 3 Oct 2019 13:01:00 +0000 (13:01 +0000)
committerYitzhak Mandelbaum <yitzhakm@google.com>
Thu, 3 Oct 2019 13:01:00 +0000 (13:01 +0000)
commite80e8896957402c66aad3514ca9c865268d726b3
treed75c0b31bbab28517c51e285b0ea7d41389a0c2b
parentc79099e0f44d0f85515fd30c83923d9d9dc1679b
[libTooling] Add various Stencil combinators for expressions.

Summary:
This revision adds three new Stencil combinators:
* `expression`, which idiomatically constructs the source for an expression,
  including wrapping the expression's source in parentheses if needed.
* `deref`, which constructs an idiomatic dereferencing expression.
* `addressOf`, which constructs an idiomatic address-taking expression.

Reviewers: gribozavr

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 373593
clang/include/clang/Tooling/Refactoring/Stencil.h
clang/lib/Tooling/Refactoring/Stencil.cpp
clang/unittests/Tooling/StencilTest.cpp