[all-commits] [llvm/llvm-project] d89f9e: [ASTMatchers] Output currently processing match an...

Nathan James via All-commits all-commits at lists.llvm.org
Mon Mar 21 12:13:56 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d89f9e963e4979466193dc6a15fe091bf7ca5c47
      https://github.com/llvm/llvm-project/commit/d89f9e963e4979466193dc6a15fe091bf7ca5c47
  Author: Nathan James <n.james93 at hotmail.co.uk>
  Date:   2022-03-21 (Mon, 21 Mar 2022)

  Changed paths:
    M clang-tools-extra/docs/ReleaseNotes.rst
    M clang/lib/ASTMatchers/ASTMatchFinder.cpp
    M clang/unittests/ASTMatchers/ASTMatchersInternalTest.cpp

  Log Message:
  -----------
  [ASTMatchers] Output currently processing match and nodes on crash

Create a PrettyStackTraceEvent that will dump the current `MatchCallback` id as well as the `BoundNodes` if the 'run' method of a `MatchCallback` results in a crash.
The purpose of this is sometimes clang-tidy checks can crash in the `check` method. And in a large codebase with alot of checks enabled and in a release build, it can be near impossible to figure out which check as well as the source code that caused the crash. Without that information a reproducer is very hard to create.
This is a more generalised version of D118520 which has a nicer integration and should be useful to clients other than clang-tidy.

Reviewed By: aaron.ballman

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




More information about the All-commits mailing list