[clang] [llvm] Make sanitizer special case list slash-agnostic (PR #149886)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 7 10:04:34 PDT 2025
================
@@ -595,10 +612,18 @@ bool WarningsSpecialCaseList::isDiagSuppressed(diag::kind DiagId,
SrcEntriesIt->getValue();
// We also use presumed locations here to improve reproducibility for
// preprocessed inputs.
- if (PresumedLoc PLoc = SM.getPresumedLoc(DiagLoc); PLoc.isValid())
- return globsMatches(
- CategoriesToMatchers,
- llvm::sys::path::remove_leading_dotslash(PLoc.getFilename()));
+ if (PresumedLoc PLoc = SM.getPresumedLoc(DiagLoc); PLoc.isValid()) {
+ if (CanonicalizePaths) {
----------------
vitalybuka wrote:
is going to be common thing for all users of
```
if (CanonicalizePaths) {
return globsMatches(
CategoriesToMatchers,
llvm::sys::path::convert_to_slash(
llvm::sys::path::remove_leading_dotslash(PLoc.getFilename())));
} else {
return globsMatches(
CategoriesToMatchers,
llvm::sys::path::remove_leading_dotslash(PLoc.getFilename()));
}
```
Lets put that thing into `SpecialCaseList::NormalizePath()`
https://github.com/llvm/llvm-project/pull/149886
More information about the llvm-commits
mailing list