diff options
author | Chris Lattner <sabre@nondot.org> | 2011-04-09 06:29:24 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-04-09 06:29:24 +0000 |
commit | 0687ec705197b20295e0ae291183ec82da0ce904 (patch) | |
tree | 0ae2ae71c7aa74062737eab86631f4826d45d1a4 /llvm/lib/Support/Regex.cpp | |
parent | 53e0679d6f574b2d4e7ee05d51556edd8cc71750 (diff) | |
download | bcm5719-llvm-0687ec705197b20295e0ae291183ec82da0ce904.tar.gz bcm5719-llvm-0687ec705197b20295e0ae291183ec82da0ce904.zip |
regexes are allowed to match empty things, e.g. {{.*}} in filecheck.
llvm-svn: 129193
Diffstat (limited to 'llvm/lib/Support/Regex.cpp')
-rw-r--r-- | llvm/lib/Support/Regex.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/Regex.cpp b/llvm/lib/Support/Regex.cpp index 309ffb02dec..d293da07d68 100644 --- a/llvm/lib/Support/Regex.cpp +++ b/llvm/lib/Support/Regex.cpp @@ -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)); } |