File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -943,17 +943,15 @@ BufferIndirectlyCausingDiagnosticRAII::BufferIndirectlyCausingDiagnosticRAII(
943
943
}
944
944
945
945
void DiagnosticEngine::onTentativeDiagnosticFlush (Diagnostic &diagnostic) {
946
- for (auto curr = diagnostic.Args .begin (), last = diagnostic.Args .end ();
947
- curr != last; ++curr) {
948
- auto &arg = *curr;
949
- if (arg.getKind () != DiagnosticArgumentKind::String)
946
+ for (auto &argument : diagnostic.Args ) {
947
+ if (argument.getKind () != DiagnosticArgumentKind::String)
950
948
continue ;
951
949
952
- auto str = arg .getAsString ();
953
- if (str .empty ())
950
+ auto content = argument .getAsString ();
951
+ if (content .empty ())
954
952
continue ;
955
953
956
- auto I = TransactionStrings.insert (std::make_pair (str , char ())).first ;
957
- *curr = DiagnosticArgument (StringRef (I->getKeyData ()));
954
+ auto I = TransactionStrings.insert (std::make_pair (content , char ())).first ;
955
+ argument = DiagnosticArgument (StringRef (I->getKeyData ()));
958
956
}
959
957
}
You can’t perform that action at this time.
0 commit comments