diff options
| author | Zachary Turner <zturner@google.com> | 2016-09-21 17:13:51 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2016-09-21 17:13:51 +0000 |
| commit | 2552acd945cc8e2f32b777819844792b8e66b068 (patch) | |
| tree | bf2752b029a5e4c56f935b4b62dfcd0c2576ac2b /lldb/source/Core | |
| parent | 8de63464b8378f5f8529b775bae6c5f540184dc4 (diff) | |
| download | bcm5719-llvm-2552acd945cc8e2f32b777819844792b8e66b068.tar.gz bcm5719-llvm-2552acd945cc8e2f32b777819844792b8e66b068.zip | |
Fix failing regex tests.
r282079 converted the regular expression interface to accept
and return StringRefs instead of char pointers. In one case
a null pointer check was converted to an empty string check,
but this was an incorrect conversion because an empty string
is a valid regular expression. Removing this check should
fix the test failures.
llvm-svn: 282090
Diffstat (limited to 'lldb/source/Core')
| -rw-r--r-- | lldb/source/Core/RegularExpression.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Core/RegularExpression.cpp b/lldb/source/Core/RegularExpression.cpp index 6cbdcff79cc..6be67f2450f 100644 --- a/lldb/source/Core/RegularExpression.cpp +++ b/lldb/source/Core/RegularExpression.cpp @@ -102,7 +102,7 @@ bool RegularExpression::Compile(llvm::StringRef str) { //--------------------------------------------------------------------- bool RegularExpression::Execute(llvm::StringRef str, Match *match) const { int err = 1; - if (!str.empty() && m_comp_err == 0) { + if (m_comp_err == 0) { // Argument to regexec must be null-terminated. std::string reg_str = str; if (match) { |

