[llvm] [Support] Extract simple suffix from GlobPattern (PR #162118)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 6 13:31:13 PDT 2025
================
@@ -143,6 +143,15 @@ GlobPattern::create(StringRef S, std::optional<size_t> MaxSubPatterns) {
return Pat;
S = S.substr(PrefixSize);
+ // Just in case we stop on unmatched opening brackets.
+ size_t SuffixStart = S.find_last_of("?*[]{}\\");
+ assert(SuffixStart != std::string::npos);
+ if (S[SuffixStart] == '\\')
----------------
vitalybuka wrote:
It does not look like, see line 239
https://github.com/llvm/llvm-project/pull/162118
More information about the llvm-commits
mailing list