Skip to content

Commit bdaeaf1

Browse files
committed
Don't pass SubstitutionMap by const reference
1 parent 1586105 commit bdaeaf1

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

lib/Sema/CSGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3745,7 +3745,7 @@ void ConstraintSystem::optimizeConstraints(Expr *e) {
37453745

37463746
bool swift::areGenericRequirementsSatisfied(
37473747
const DeclContext *DC, const GenericSignature *sig,
3748-
const SubstitutionMap &Substitutions, bool isExtension) {
3748+
SubstitutionMap Substitutions, bool isExtension) {
37493749

37503750
TypeChecker &TC = createTypeChecker(DC->getASTContext());
37513751
ConstraintSystemOptions Options;

lib/Sema/ResilienceDiagnostics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ static bool diagnoseDeclExportability(SourceLoc loc, const ValueDecl *D,
228228

229229
static bool
230230
diagnoseGenericArgumentsExportability(SourceLoc loc,
231-
const SubstitutionMap &subs,
231+
SubstitutionMap subs,
232232
const SourceFile &userSF) {
233233
bool hadAnyIssues = false;
234234
for (ProtocolConformanceRef conformance : subs.getConformances()) {

lib/Sema/TypeCheckAccess.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,7 @@ class ExportabilityChecker : public DeclVisitor<ExportabilityChecker> {
15161516
diagnoseType(typeDecl, /*typeRepr*/nullptr);
15171517
}
15181518

1519-
void visitSubstitutionMap(const SubstitutionMap &subs) {
1519+
void visitSubstitutionMap(SubstitutionMap subs) {
15201520
for (ProtocolConformanceRef conformance : subs.getConformances()) {
15211521
if (!conformance.isConcrete())
15221522
continue;

lib/Sema/TypeChecker.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2169,7 +2169,7 @@ bool fixDeclarationObjCName(InFlightDiagnostic &diag, ValueDecl *decl,
21692169

21702170
bool areGenericRequirementsSatisfied(const DeclContext *DC,
21712171
const GenericSignature *sig,
2172-
const SubstitutionMap &Substitutions,
2172+
SubstitutionMap Substitutions,
21732173
bool isExtension);
21742174

21752175
} // end namespace swift

0 commit comments

Comments
 (0)