summaryrefslogtreecommitdiff
path: root/lib/Support/Regex.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-04-09 06:29:24 +0000
committerChris Lattner <sabre@nondot.org>2011-04-09 06:29:24 +0000
commit6ff80b2281eea0f42458bbf9790d5e340d9d7797 (patch)
tree21b71285e664649b2ca76a4cd0c38cffc98741b0 /lib/Support/Regex.cpp
parent13a38c4cb4c90a6d2b5313a6517d6291cb924730 (diff)
downloadllvm-6ff80b2281eea0f42458bbf9790d5e340d9d7797.tar.gz
llvm-6ff80b2281eea0f42458bbf9790d5e340d9d7797.tar.bz2
llvm-6ff80b2281eea0f42458bbf9790d5e340d9d7797.tar.xz
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
Diffstat (limited to 'lib/Support/Regex.cpp')
-rw-r--r--lib/Support/Regex.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/Regex.cpp b/lib/Support/Regex.cpp
index 309ffb02de..d293da07d6 100644
--- a/lib/Support/Regex.cpp
+++ b/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));
}