@@ -35,20 +35,20 @@ void TextDiagnosticBuffer::HandleDiagnostic(
35
35
llvm_unreachable (" Diagnostic not handled during diagnostic buffering!" );
36
36
case clang::DiagnosticsEngine::Note:
37
37
all.emplace_back (level, notes.size ());
38
- notes.emplace_back (info.getLocation (), std::string (buf. str () ));
38
+ notes.emplace_back (info.getLocation (), std::string (buf));
39
39
break ;
40
40
case clang::DiagnosticsEngine::Warning:
41
41
all.emplace_back (level, warnings.size ());
42
- warnings.emplace_back (info.getLocation (), std::string (buf. str () ));
42
+ warnings.emplace_back (info.getLocation (), std::string (buf));
43
43
break ;
44
44
case clang::DiagnosticsEngine::Remark:
45
45
all.emplace_back (level, remarks.size ());
46
- remarks.emplace_back (info.getLocation (), std::string (buf. str () ));
46
+ remarks.emplace_back (info.getLocation (), std::string (buf));
47
47
break ;
48
48
case clang::DiagnosticsEngine::Error:
49
49
case clang::DiagnosticsEngine::Fatal:
50
50
all.emplace_back (level, errors.size ());
51
- errors.emplace_back (info.getLocation (), std::string (buf. str () ));
51
+ errors.emplace_back (info.getLocation (), std::string (buf));
52
52
break ;
53
53
}
54
54
}
0 commit comments