================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to