[PATCH] D153587: [GlobPattern] Support brace expansions
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 28 14:57:01 PDT 2023
MaskRay added a comment.
In D153587#4622617 <https://reviews.llvm.org/D153587#4622617>, @ellis wrote:
> In D153587#4622527 <https://reviews.llvm.org/D153587#4622527>, @MaskRay wrote:
>
>> I think we likely need to make brace expansion an opt-in feature (similar to `GLOB_BRACE` for glob). *BSD glob.h defines some arbitrary limits to prevent exponential time causing problems.
>> Using brace expansion in sanitizer ignore lists is totally fine and I fully support it, but other places may not want the feature with problematic time complexity (assuming that we don't implement NFA or use regex).
>
> That makes sense. I think I can implement this by making `MaxSubPatterns=1` to mean that globs are disabled and have that be the default. Or did you mean we should add a compile-time variable to enable/disable globs similar to `LLVM_ENABLE_THREADS`?
`MaxSubPatterns=1` makes `{` a metacharacter so that it cannot be used in regular pattern. The parameter can probably be an `optional<size_t>`.
I think we don't want to introduced configure-time variables for this brace expansion...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153587/new/
https://reviews.llvm.org/D153587
More information about the llvm-commits
mailing list