[llvm-commits] [llvm] r129193 - /llvm/trunk/lib/Support/Regex.cpp
Chris Lattner
sabre at nondot.org
Fri Apr 8 23:29:24 PDT 2011
Author: lattner
Date: Sat Apr 9 01:29:24 2011
New Revision: 129193
URL: http://llvm.org/viewvc/llvm-project?rev=129193&view=rev
Log:
regexes are allowed to match empty things, e.g. {{.*}} in filecheck.
Modified:
llvm/trunk/lib/Support/Regex.cpp
Modified: llvm/trunk/lib/Support/Regex.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Regex.cpp?rev=129193&r1=129192&r2=129193&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Regex.cpp (original)
+++ llvm/trunk/lib/Support/Regex.cpp Sat Apr 9 01:29:24 2011
@@ -82,7 +82,7 @@
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));
}
More information about the llvm-commits
mailing list