[all-commits] [llvm/llvm-project] 0944c1: [libTooling] Adds more support for constructing ob...

Yitzhak Mandelbaum via All-commits all-commits at lists.llvm.org
Tue Jan 25 11:44:08 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0944c196c58f62299540983e2d10cd7bef60691a
      https://github.com/llvm/llvm-project/commit/0944c196c58f62299540983e2d10cd7bef60691a
  Author: Yitzhak Mandelbaum <yitzhakm at google.com>
  Date:   2022-01-25 (Tue, 25 Jan 2022)

  Changed paths:
    M clang/include/clang/Tooling/Transformer/SourceCodeBuilders.h
    M clang/lib/Tooling/Transformer/SourceCodeBuilders.cpp
    M clang/lib/Tooling/Transformer/Stencil.cpp
    M clang/unittests/Tooling/SourceCodeBuildersTest.cpp
    M clang/unittests/Tooling/StencilTest.cpp

  Log Message:
  -----------
  [libTooling] Adds more support for constructing object access expressions.

This patch adds a `buildAccess` function, which constructs a string with the
proper operator to use based on the expression's form and type. It also adds two
predicates related to smart pointers, which are needed by `buildAccess` but are
also of general value.

We deprecate `buildDot` and `buildArrow` in favor of the more general
`buildAccess`. These will be removed in a future patch.

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




More information about the All-commits mailing list