jgorbe updated this revision to Diff 201029. jgorbe added a comment. Fixed indentation.
CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62334/new/ https://reviews.llvm.org/D62334 Files: lldb/source/Utility/RegularExpression.cpp Index: lldb/source/Utility/RegularExpression.cpp =================================================================== --- lldb/source/Utility/RegularExpression.cpp +++ lldb/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()); }
Index: lldb/source/Utility/RegularExpression.cpp =================================================================== --- lldb/source/Utility/RegularExpression.cpp +++ lldb/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()); }
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits