[clang] [llvm] Make sanitizer special case list slash-agnostic (PR #149886)
James Y Knight via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 6 09:46:45 PDT 2025
================
@@ -231,6 +233,10 @@ bool GlobPattern::SubGlobPattern::match(StringRef Str) const {
++S;
continue;
}
+ } else if (IsSlashAgnostic && *P == '/' && (*S == '/' || *S == '\\')) {
----------------
jyknight wrote:
`*S == '/'` is redundant here and can be removed; it'd be handled in the next clause anyhow.
For completeness, it may make sense on windows to also match `\\` against `/`. Then we can document as "now treats forward and backward slashes as equivalent when matching paths"
https://github.com/llvm/llvm-project/pull/149886
More information about the llvm-commits
mailing list