aboutsummaryrefslogtreecommitdiffstats
path: root/source/Expression/DiagnosticManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Expression/DiagnosticManager.cpp')
-rw-r--r--source/Expression/DiagnosticManager.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/source/Expression/DiagnosticManager.cpp b/source/Expression/DiagnosticManager.cpp
index 53d85f8a6d54..48eba3586d30 100644
--- a/source/Expression/DiagnosticManager.cpp
+++ b/source/Expression/DiagnosticManager.cpp
@@ -47,7 +47,7 @@ static const char *StringForSeverity(DiagnosticSeverity severity) {
std::string DiagnosticManager::GetString(char separator) {
std::string ret;
- for (const Diagnostic *diagnostic : Diagnostics()) {
+ for (const auto &diagnostic : Diagnostics()) {
ret.append(StringForSeverity(diagnostic->GetSeverity()));
ret.append(diagnostic->GetMessage());
ret.push_back(separator);
@@ -70,19 +70,9 @@ size_t DiagnosticManager::Printf(DiagnosticSeverity severity,
return result;
}
-size_t DiagnosticManager::PutString(DiagnosticSeverity severity,
- llvm::StringRef str) {
+void DiagnosticManager::PutString(DiagnosticSeverity severity,
+ llvm::StringRef str) {
if (str.empty())
- return 0;
+ return;
AddDiagnostic(str, severity, eDiagnosticOriginLLDB);
- return str.size();
-}
-
-void DiagnosticManager::CopyDiagnostics(DiagnosticManager &otherDiagnostics) {
- for (const DiagnosticList::value_type &other_diagnostic:
- otherDiagnostics.Diagnostics()) {
- AddDiagnostic(
- other_diagnostic->GetMessage(), other_diagnostic->GetSeverity(),
- other_diagnostic->getKind(), other_diagnostic->GetCompilerID());
- }
}