[all-commits] [llvm/llvm-project] 44de29: Reland: [NFC][Support] Implement slash-agnostic pa...
Vitaly Buka via All-commits
all-commits at lists.llvm.org
Sat Jun 27 07:19:50 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 44de29c6b94391626674b8b272f30a71575c28f4
https://github.com/llvm/llvm-project/commit/44de29c6b94391626674b8b272f30a71575c28f4
Author: Vitaly Buka <vitalybuka at google.com>
Date: 2026-06-27 (Sat, 27 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:
-----------
Reland: [NFC][Support] Implement slash-agnostic path matching in GlobPattern (#206251)
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.
Reland of #202854 incorrectly reverted in #205409.
https://github.com/llvm/llvm-project/pull/202854#issuecomment-4813462549
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