Files
llvm/clang/lib/Basic
Vitaly Buka ab08fbd92c [clang] Switch warning suppression multi-match rule to "last match takes precedence"
The current "longest match takes precedence" rule
for warning suppression mappings can be confusing,
especially in long suppression files where
tracking the length relationship between globs is
difficult.

For example, with the following rules, it's not
immediately obvious why the first one should
currently take precedence:

```
src:*test/*
src:*lld/*=emit
```

This commit changes the multi-match behavior so
the last match takes precedence. This rule is
easier to understand and consistent with the
approach used by sanitizers, simplifying the
mechanism by providing a uniform experience across
different tools.

This is potentially breaking, but very unlikely.
An investigation of known uses showed they do not
rely on the length.

Reviewers: thurstond, kadircet, fmayer

Pull Request: https://github.com/llvm/llvm-project/pull/162237
2025-11-14 14:00:38 -08:00
..