mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-04 07:32:13 +00:00
regexes are allowed to match empty things, e.g. {{.*}} in filecheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129193 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
13a38c4cb4
commit
6ff80b2281
@ -82,7 +82,7 @@ bool Regex::match(StringRef String, SmallVectorImpl<StringRef> *Matches){
|
||||
Matches->push_back(StringRef());
|
||||
continue;
|
||||
}
|
||||
assert(pm[i].rm_eo > pm[i].rm_so);
|
||||
assert(pm[i].rm_eo >= pm[i].rm_so);
|
||||
Matches->push_back(StringRef(String.data()+pm[i].rm_so,
|
||||
pm[i].rm_eo-pm[i].rm_so));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user