Skip to content

Commit e5952ab

Browse files
committed
Fix a couple of invalid location diagnostics
1 parent f3708b2 commit e5952ab

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

lib/AST/Module.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,9 +1031,8 @@ checkOperatorConflicts(const SourceFile &SF, SourceLoc loc,
10311031
if (loc.isValid()) {
10321032
ASTContext &C = SF.getASTContext();
10331033
C.Diags.diagnose(loc, diag::ambiguous_operator_decls);
1034-
C.Diags.diagnose(start->first->getLoc(),
1035-
diag::found_this_operator_decl);
1036-
C.Diags.diagnose(i->first->getLoc(), diag::found_this_operator_decl);
1034+
start->first->diagnose(diag::found_this_operator_decl);
1035+
i->first->diagnose(diag::found_this_operator_decl);
10371036
}
10381037
return end;
10391038
}
@@ -1053,8 +1052,7 @@ checkOperatorConflicts(const SourceFile &SF, SourceLoc loc,
10531052
ASTContext &C = SF.getASTContext();
10541053
C.Diags.diagnose(loc, diag::ambiguous_precedence_groups);
10551054
for (auto &entry : importedGroups) {
1056-
C.Diags.diagnose(entry.first->getLoc(),
1057-
diag::found_this_precedence_group);
1055+
entry.first->diagnose(diag::found_this_precedence_group);
10581056
}
10591057
}
10601058
return importedGroups.end();

test/decl/operator/lookup_compatibility.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
// RUN: %target-swift-frontend -emit-module %S/Inputs/lookup_moduleB.swift -module-name B -o %t -I %t
66
// RUN: %target-swift-frontend -emit-module %S/Inputs/lookup_moduleA.swift -module-name A -o %t -I %t
77
// RUN: %target-swift-frontend -emit-module %S/Inputs/lookup_module_exportsAC.swift -module-name ExportsAC -o %t -I %t
8-
9-
// FIXME: Remove -verify-ignore-unknown.
10-
// RUN: %target-swift-frontend -typecheck -verify -verify-ignore-unknown -primary-file %s %S/Inputs/lookup_other.swift %S/Inputs/lookup_other2.swift %S/Inputs/lookup_other_compat.swift -I %t
8+
// RUN: %target-swift-frontend -typecheck -verify -primary-file %s %S/Inputs/lookup_other.swift %S/Inputs/lookup_other2.swift %S/Inputs/lookup_other_compat.swift -I %t
119

1210
import ExportsAC
1311
import B

0 commit comments

Comments
 (0)