Author: teemperor Date: Tue Apr 16 00:48:11 2019 New Revision: 358477 URL: http://llvm.org/viewvc/llvm-project?rev=358477&view=rev Log: Correctly check if a warning message lacks a trailing new line
Summary: Fixes LLVM bug 41489. Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D60653 Modified: lldb/trunk/source/Core/Module.cpp Modified: lldb/trunk/source/Core/Module.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Module.cpp?rev=358477&r1=358476&r2=358477&view=diff ============================================================================== --- lldb/trunk/source/Core/Module.cpp (original) +++ lldb/trunk/source/Core/Module.cpp Tue Apr 16 00:48:11 2019 @@ -1120,7 +1120,7 @@ void Module::ReportError(const char *for const int format_len = strlen(format); if (format_len > 0) { const char last_char = format[format_len - 1]; - if (last_char != '\n' || last_char != '\r') + if (last_char != '\n' && last_char != '\r') strm.EOL(); } Host::SystemLog(Host::eSystemLogError, "%s", strm.GetData()); @@ -1152,7 +1152,7 @@ void Module::ReportErrorIfModifyDetected const int format_len = strlen(format); if (format_len > 0) { const char last_char = format[format_len - 1]; - if (last_char != '\n' || last_char != '\r') + if (last_char != '\n' && last_char != '\r') strm.EOL(); } strm.PutCString("The debug session should be aborted as the original " @@ -1178,7 +1178,7 @@ void Module::ReportWarning(const char *f const int format_len = strlen(format); if (format_len > 0) { const char last_char = format[format_len - 1]; - if (last_char != '\n' || last_char != '\r') + if (last_char != '\n' && last_char != '\r') strm.EOL(); } Host::SystemLog(Host::eSystemLogWarning, "%s", strm.GetData()); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits