[all-commits] [llvm/llvm-project] c3a21e: [ASTMatchers] Ensure that we can match inside lambdas

Stephen Kelly via All-commits all-commits at lists.llvm.org
Tue Jan 5 06:40:31 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c3a21e5de3dc3f55e4d219afd55dec518159d356
      https://github.com/llvm/llvm-project/commit/c3a21e5de3dc3f55e4d219afd55dec518159d356
  Author: Stephen Kelly <steveire at gmail.com>
  Date:   2021-01-05 (Tue, 05 Jan 2021)

  Changed paths:
    M clang/include/clang/ASTMatchers/ASTMatchersInternal.h
    M clang/lib/ASTMatchers/ASTMatchFinder.cpp
    M clang/lib/ASTMatchers/ASTMatchersInternal.cpp
    M clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp

  Log Message:
  -----------
  [ASTMatchers] Ensure that we can match inside lambdas

Because we don't know in ASTMatchFinder whether we're matching in AsIs
or IgnoreUnlessSpelledInSource mode, we need to traverse the lambda
twice, but store whether we're matching in nodes spelled in source or
not.

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




More information about the All-commits mailing list