Commit ab08fbd
committed
[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: llvm#1622371 parent 1429628 commit ab08fbd
File tree
5 files changed
+13
-17
lines changed- clang
- docs
- include/clang/Basic
- lib/Basic
- unittests/Basic
5 files changed
+13
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
971 | 971 | | |
972 | 972 | | |
973 | 973 | | |
974 | | - | |
| 974 | + | |
975 | 975 | | |
976 | 976 | | |
977 | 977 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
528 | | - | |
529 | | - | |
| 528 | + | |
530 | 529 | | |
531 | 530 | | |
532 | 531 | | |
| |||
588 | 587 | | |
589 | 588 | | |
590 | 589 | | |
591 | | - | |
592 | | - | |
| 590 | + | |
| 591 | + | |
593 | 592 | | |
594 | 593 | | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
| 594 | + | |
| 595 | + | |
600 | 596 | | |
601 | 597 | | |
602 | 598 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
| 297 | + | |
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
| 330 | + | |
| 331 | + | |
334 | 332 | | |
335 | 333 | | |
336 | 334 | | |
| |||
0 commit comments