[all-commits] [llvm/llvm-project] 44ec3e: [clang][AST] Fix AST IgnoreUnlessSpelledInSource t...

Jonathan Marriott via All-commits all-commits at lists.llvm.org
Mon Jun 30 07:48:47 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 44ec3e8f9c3e673e9f481a93e0fcbc69a23d368d
      https://github.com/llvm/llvm-project/commit/44ec3e8f9c3e673e9f481a93e0fcbc69a23d368d
  Author: Jonathan Marriott <34217286+JonathanMarriott at users.noreply.github.com>
  Date:   2025-06-30 (Mon, 30 Jun 2025)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/AST/ASTNodeTraverser.h
    M clang/unittests/AST/ASTTraverserTest.cpp

  Log Message:
  -----------
  [clang][AST] Fix AST IgnoreUnlessSpelledInSource traversal nullptr dereference (#146103)

In summary dumping a `catch(...)` statement using
IgnoreUnlessSpelledInSource AST traversal causes a seg fault, as the
variable declaration of the catch is `nullptr`.

Diagnosed the cause by attaching the debugger to `clang-query`, this PR
adds a fix to check for `nullptr` before accessing the `isImplicit()`
method of the `Decl` pointee in the AST node traverser visitor

Fixes #146101



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list