[all-commits] [llvm/llvm-project] 63e33c: [NFC][Support] Implement slash-agnostic path match...
Vitaly Buka via All-commits
all-commits at lists.llvm.org
Thu Jun 11 00:32:52 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 63e33c6aeed23e71763ea0dea89621d89866446e
https://github.com/llvm/llvm-project/commit/63e33c6aeed23e71763ea0dea89621d89866446e
Author: Vitaly Buka <vitalybuka at google.com>
Date: 2026-06-11 (Thu, 11 Jun 2026)
Changed paths:
M llvm/include/llvm/Support/GlobPattern.h
M llvm/lib/Support/GlobPattern.cpp
M llvm/unittests/Support/GlobPatternTest.cpp
Log Message:
-----------
[NFC][Support] Implement slash-agnostic path matching in GlobPattern (#202854)
Add a SlashAgnostic option to GlobPattern to allow matching path
separators
(both forward slashes and backslashes) agnostically.
When enabled:
- We conservatively reduce the plain prefix and suffix by treating path
separators as metacharacters. This ensures that path separators are
matched via the slash-agnostic state machine rather than plain string
comparison.
- Brackets containing slashes are adjusted to match both separators.
- Character comparisons in the state machine (matchChar) treat '/' and
'\' as equivalent.
For #149886.
Co-authored-by: Devon Loehr <DKLoehr at users.noreply.github.com>
Assisted-by: Gemini
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list