[all-commits] [llvm/llvm-project] d0da5d: Change default traversal in AST Matchers to ignore...

Stephen Kelly via All-commits all-commits at lists.llvm.org
Sun May 24 16:19:19 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d0da5d2bbe8305d06dc01a98706fd73e11e24a9f
      https://github.com/llvm/llvm-project/commit/d0da5d2bbe8305d06dc01a98706fd73e11e24a9f
  Author: Stephen Kelly <steveire at gmail.com>
  Date:   2020-05-25 (Mon, 25 May 2020)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/AST/ParentMapContext.h

  Log Message:
  -----------
  Change default traversal in AST Matchers to ignore invisible nodes

This makes many scenarios simpler by not requiring the user to write
ignoringImplicit() all the time, nor to account for non-visible
cxxConstructExpr() and cxxMemberCalExpr() nodes. This is also, in part,
inclusive of the equivalent of adding a use of ignoringParenImpCasts()
between all expr()-related matchers in an expression.

The pre-existing traverse(TK_AsIs, ...) matcher can be used to explcitly
match on implicit/invisible nodes. See

  http://lists.llvm.org/pipermail/cfe-dev/2019-December/064143.html

for more

Reviewers: aaron.ballman

Subscribers: cfe-commits

Tags: #clang

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




More information about the All-commits mailing list