[clang] [llvm] Make sanitizer special case list slash-agnostic (PR #149886)

Devon Loehr via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 6 10:42:28 PDT 2025


================
@@ -137,7 +137,7 @@ GlobPattern::create(StringRef S, std::optional<size_t> MaxSubPatterns) {
   GlobPattern Pat;
 
   // Store the prefix that does not contain any metacharacter.
-  size_t PrefixSize = S.find_first_of("?*[{\\");
+  size_t PrefixSize = S.find_first_of("?*[{\\/");
----------------
DKLoehr wrote:

> Maybe add a member of GlobPattern::IsSlashAgnostic?

This was the original strategy, IIRC I changed it because we wanted to restrict it only to filenames and that information wasn't readily available when we're making it a glob. I suppose we could thread it through if we have to.

https://github.com/llvm/llvm-project/pull/149886


More information about the cfe-commits mailing list