mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Fix a couple of invalid location diagnostics
This commit is contained in:
@@ -1031,9 +1031,8 @@ checkOperatorConflicts(const SourceFile &SF, SourceLoc loc,
|
||||
if (loc.isValid()) {
|
||||
ASTContext &C = SF.getASTContext();
|
||||
C.Diags.diagnose(loc, diag::ambiguous_operator_decls);
|
||||
C.Diags.diagnose(start->first->getLoc(),
|
||||
diag::found_this_operator_decl);
|
||||
C.Diags.diagnose(i->first->getLoc(), diag::found_this_operator_decl);
|
||||
start->first->diagnose(diag::found_this_operator_decl);
|
||||
i->first->diagnose(diag::found_this_operator_decl);
|
||||
}
|
||||
return end;
|
||||
}
|
||||
@@ -1053,8 +1052,7 @@ checkOperatorConflicts(const SourceFile &SF, SourceLoc loc,
|
||||
ASTContext &C = SF.getASTContext();
|
||||
C.Diags.diagnose(loc, diag::ambiguous_precedence_groups);
|
||||
for (auto &entry : importedGroups) {
|
||||
C.Diags.diagnose(entry.first->getLoc(),
|
||||
diag::found_this_precedence_group);
|
||||
entry.first->diagnose(diag::found_this_precedence_group);
|
||||
}
|
||||
}
|
||||
return importedGroups.end();
|
||||
|
||||
Reference in New Issue
Block a user