mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +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();
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
// RUN: %target-swift-frontend -emit-module %S/Inputs/lookup_moduleB.swift -module-name B -o %t -I %t
|
||||
// RUN: %target-swift-frontend -emit-module %S/Inputs/lookup_moduleA.swift -module-name A -o %t -I %t
|
||||
// RUN: %target-swift-frontend -emit-module %S/Inputs/lookup_module_exportsAC.swift -module-name ExportsAC -o %t -I %t
|
||||
|
||||
// FIXME: Remove -verify-ignore-unknown.
|
||||
// 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
|
||||
// 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
|
||||
|
||||
import ExportsAC
|
||||
import B
|
||||
|
||||
Reference in New Issue
Block a user