@@ -6262,9 +6262,8 @@ void ASTReader::ReadPragmaDiagnosticMappings(DiagnosticsEngine &Diag) {
6262
6262
6263
6263
DiagStates.clear ();
6264
6264
6265
- auto ReadDiagState =
6266
- [&](const DiagState &BasedOn, SourceLocation Loc,
6267
- bool IncludeNonPragmaStates) -> DiagnosticsEngine::DiagState * {
6265
+ auto ReadDiagState = [&](const DiagState &BasedOn,
6266
+ bool IncludeNonPragmaStates) {
6268
6267
unsigned BackrefID = Record[Idx++];
6269
6268
if (BackrefID != 0 )
6270
6269
return DiagStates[BackrefID - 1 ];
@@ -6325,7 +6324,7 @@ void ASTReader::ReadPragmaDiagnosticMappings(DiagnosticsEngine &Diag) {
6325
6324
Initial.EnableAllWarnings = Flags & 1 ; Flags >>= 1 ;
6326
6325
Initial.IgnoreAllWarnings = Flags & 1 ; Flags >>= 1 ;
6327
6326
Initial.ExtBehavior = (diag::Severity)Flags;
6328
- FirstState = ReadDiagState (Initial, SourceLocation (), true );
6327
+ FirstState = ReadDiagState (Initial, true );
6329
6328
6330
6329
assert (F.OriginalSourceFileID .isValid ());
6331
6330
@@ -6338,8 +6337,7 @@ void ASTReader::ReadPragmaDiagnosticMappings(DiagnosticsEngine &Diag) {
6338
6337
// For prefix ASTs, start with whatever the user configured on the
6339
6338
// command line.
6340
6339
Idx++; // Skip flags.
6341
- FirstState = ReadDiagState (*Diag.DiagStatesByLoc .CurDiagState ,
6342
- SourceLocation (), false );
6340
+ FirstState = ReadDiagState (*Diag.DiagStatesByLoc .CurDiagState , false );
6343
6341
}
6344
6342
6345
6343
// Read the state transitions.
@@ -6361,8 +6359,7 @@ void ASTReader::ReadPragmaDiagnosticMappings(DiagnosticsEngine &Diag) {
6361
6359
F.StateTransitions .reserve (F.StateTransitions .size () + Transitions);
6362
6360
for (unsigned I = 0 ; I != Transitions; ++I) {
6363
6361
unsigned Offset = Record[Idx++];
6364
- auto *State =
6365
- ReadDiagState (*FirstState, Loc.getLocWithOffset (Offset), false );
6362
+ auto *State = ReadDiagState (*FirstState, false );
6366
6363
F.StateTransitions .push_back ({State, Offset});
6367
6364
}
6368
6365
}
@@ -6372,7 +6369,7 @@ void ASTReader::ReadPragmaDiagnosticMappings(DiagnosticsEngine &Diag) {
6372
6369
" Invalid data, missing final pragma diagnostic state" );
6373
6370
SourceLocation CurStateLoc =
6374
6371
ReadSourceLocation (F, F.PragmaDiagMappings [Idx++]);
6375
- auto *CurState = ReadDiagState (*FirstState, CurStateLoc, false );
6372
+ auto *CurState = ReadDiagState (*FirstState, false );
6376
6373
6377
6374
if (!F.isModule ()) {
6378
6375
Diag.DiagStatesByLoc .CurDiagState = CurState;
0 commit comments