[Lldb-commits] [PATCH] D62334: [lldb] Make sure RegularExpression constructors always initialize member variables
Jorge Gorbe Moya via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu May 23 13:11:52 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rLLDB361546: [lldb] Make sure RegularExpression constructors always initialize member… (authored by jgorbe, committed by ).
Herald added a project: LLDB.
Changed prior to commit:
https://reviews.llvm.org/D62334?vs=201029&id=201050#toc
Repository:
rLLDB LLDB
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62334/new/
https://reviews.llvm.org/D62334
Files:
source/Utility/RegularExpression.cpp
Index: source/Utility/RegularExpression.cpp
===================================================================
--- source/Utility/RegularExpression.cpp
+++ source/Utility/RegularExpression.cpp
@@ -29,13 +29,12 @@
// Constructor that compiles "re" using "flags" and stores the resulting
// compiled regular expression into this object.
RegularExpression::RegularExpression(llvm::StringRef str)
- : m_re(), m_comp_err(1), m_preg() {
- memset(&m_preg, 0, sizeof(m_preg));
+ : RegularExpression() {
Compile(str);
}
-RegularExpression::RegularExpression(const RegularExpression &rhs) {
- memset(&m_preg, 0, sizeof(m_preg));
+RegularExpression::RegularExpression(const RegularExpression &rhs)
+ : RegularExpression() {
Compile(rhs.GetText());
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62334.201050.patch
Type: text/x-patch
Size: 766 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190523/f514534b/attachment-0001.bin>
More information about the lldb-commits
mailing list