From df8bdcadf95ef8f7c7593765101cb1f0f5dea87f Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Mon, 12 Aug 2019 14:37:12 +0000 Subject: [PATCH] [lldb][NFC] Minor fixes for lldb_private::DiagnosticManager llvm-svn: 368582 --- lldb/include/lldb/Expression/DiagnosticManager.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lldb/include/lldb/Expression/DiagnosticManager.h b/lldb/include/lldb/Expression/DiagnosticManager.h index 39cca98..91fe8a4 100644 --- a/lldb/include/lldb/Expression/DiagnosticManager.h +++ b/lldb/include/lldb/Expression/DiagnosticManager.h @@ -106,7 +106,7 @@ public: } } - bool HasFixIts() { + bool HasFixIts() const { for (Diagnostic *diag : m_diagnostics) { if (diag->HasFixIts()) return true; @@ -130,9 +130,8 @@ public: void PutString(DiagnosticSeverity severity, llvm::StringRef str); void AppendMessageToDiagnostic(llvm::StringRef str) { - if (!m_diagnostics.empty()) { + if (!m_diagnostics.empty()) m_diagnostics.back()->AppendMessage(str); - } } // Returns a string containing errors in this format: @@ -149,7 +148,6 @@ public: // Moves fixed_expression to the internal storage. void SetFixedExpression(std::string fixed_expression) { m_fixed_expression = std::move(fixed_expression); - fixed_expression.clear(); } protected: -- 2.7.4