evgeny777 updated this revision to Diff 35620. evgeny777 added a comment. Revised, now contains fix for just assignment operation The "if(vpRhs != nullptr)" was removed to provide the same behaviour for
a) CMIUtilString s = (char*)nullptr; b) s = (char*)nullptr; http://reviews.llvm.org/D13094 Files: tools/lldb-mi/MIUtilString.cpp Index: tools/lldb-mi/MIUtilString.cpp =================================================================== --- tools/lldb-mi/MIUtilString.cpp +++ tools/lldb-mi/MIUtilString.cpp @@ -76,14 +76,7 @@ //-- CMIUtilString &CMIUtilString::operator=(const char *vpRhs) { - if (*this == vpRhs) - return *this; - - if (vpRhs != nullptr) - { - assign(vpRhs); - } - + assign(vpRhs); return *this; }
Index: tools/lldb-mi/MIUtilString.cpp =================================================================== --- tools/lldb-mi/MIUtilString.cpp +++ tools/lldb-mi/MIUtilString.cpp @@ -76,14 +76,7 @@ //-- CMIUtilString &CMIUtilString::operator=(const char *vpRhs) { - if (*this == vpRhs) - return *this; - - if (vpRhs != nullptr) - { - assign(vpRhs); - } - + assign(vpRhs); return *this; }
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits