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());
 }
 


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());
 }
 
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to