[llvm-branch-commits] [clang] release/22.x: [clang] Add missing support for traversal kind in addMatcher overloads (#170953) (PR #184039)

Victor Chernyakin via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Mar 2 06:54:08 PST 2026


localspook wrote:

> But (e.g.) clang-tidy also supports plugins and so changing the AST matcher behavior means it may link but behave in a surprising manner.

In theory, someone could be relying on this behavior. On the other hand, no check in clang-tidy was, and the previous behavior was the root cause of two bugs, so you could argue this change has more potential to fix downstream code.

> if a release manager or someone else has concerns, I think it's also fine to not backport (nothing seems to be on fire, at least unless I've missed something).

Agreed, it's not a critical change. And if it doesn't go in, we can always backport targeted workarounds in the affected checks (wrap the matchers in `traverse(TK_IgnoreUnlessSpelledInSource, ...)`).

https://github.com/llvm/llvm-project/pull/184039


More information about the llvm-branch-commits mailing list