diff --git a/lib/AST/ASTPrinter.cpp b/lib/AST/ASTPrinter.cpp index 2242a7ecc78ae..765b5d7b498db 100644 --- a/lib/AST/ASTPrinter.cpp +++ b/lib/AST/ASTPrinter.cpp @@ -4521,7 +4521,7 @@ void PrintAST::visitSubscriptDecl(SubscriptDecl *decl) { Printer.callPrintStructurePre(PrintStructureKind::FunctionReturnType); if (!Options.SuppressSendingArgsAndResults) { - if (auto typeRepr = decl->getElementTypeRepr()) { + if (decl->getElementTypeRepr()) { if (isa(decl->getResultTypeRepr())) Printer << "sending "; } diff --git a/lib/AST/ProtocolConformanceRef.cpp b/lib/AST/ProtocolConformanceRef.cpp index 642b2ed18bd07..494511e6573d5 100644 --- a/lib/AST/ProtocolConformanceRef.cpp +++ b/lib/AST/ProtocolConformanceRef.cpp @@ -98,7 +98,7 @@ ProtocolConformanceRef::subst(Type origType, InFlightSubstitution &IFS) const { // If the type is an opaque archetype, the conformance will remain abstract, // unless we're specifically substituting opaque types. - if (auto origArchetype = origType->getAs()) { + if (origType->getAs()) { if (!IFS.shouldSubstituteOpaqueArchetypes()) { return forAbstract(origType.subst(IFS), proto); } diff --git a/lib/Macros/Sources/SwiftMacros/DistributedResolvableMacro.swift b/lib/Macros/Sources/SwiftMacros/DistributedResolvableMacro.swift index 3b0918d13f00f..6ce7b0b122608 100644 --- a/lib/Macros/Sources/SwiftMacros/DistributedResolvableMacro.swift +++ b/lib/Macros/Sources/SwiftMacros/DistributedResolvableMacro.swift @@ -80,7 +80,7 @@ extension DistributedResolvableMacro { if var variable = requirement.decl.as(VariableDeclSyntax.self) { variable.modifiers = variable.modifiers.filter { !$0.isAccessControl } access.reversed().forEach { modifier in - variable.modifiers = variable.modifiers.prepending(modifier) + variable.modifiers = [modifier] + variable.modifiers } var accessorStubs: [String] = [] @@ -106,7 +106,7 @@ extension DistributedResolvableMacro { } else if var fun = requirement.decl.as(FunctionDeclSyntax.self) { fun.modifiers = fun.modifiers.filter { !$0.isAccessControl } access.reversed().forEach { modifier in - fun.modifiers = fun.modifiers.prepending(modifier) + fun.modifiers = [modifier] + fun.modifiers } // normal function stub diff --git a/lib/Macros/Sources/SwiftMacros/SwiftifyImportMacro.swift b/lib/Macros/Sources/SwiftMacros/SwiftifyImportMacro.swift index 091d9cd140338..903b4078c39b3 100644 --- a/lib/Macros/Sources/SwiftMacros/SwiftifyImportMacro.swift +++ b/lib/Macros/Sources/SwiftMacros/SwiftifyImportMacro.swift @@ -677,14 +677,14 @@ struct CountedOrSizedReturnPointerThunkBuilder: PointerBoundsThunkBuilder { if unsafe _resultValue == nil { return nil } else { - return unsafe \(raw: try cast)(\(raw: startLabel): _resultValue!, count: Int(\(countExpr))) + return unsafe \(raw: cast)(\(raw: startLabel): _resultValue!, count: Int(\(countExpr))) } }() """ } return """ - unsafe \(raw: try cast)(\(raw: startLabel): \(call), count: Int(\(countExpr))) + unsafe \(raw: cast)(\(raw: startLabel): \(call), count: Int(\(countExpr))) """ } } diff --git a/lib/SIL/IR/SILConstants.cpp b/lib/SIL/IR/SILConstants.cpp index 1fc14d9ecb241..3996a1c3694c4 100644 --- a/lib/SIL/IR/SILConstants.cpp +++ b/lib/SIL/IR/SILConstants.cpp @@ -71,6 +71,7 @@ void SymbolicValue::print(llvm::raw_ostream &os, unsigned indent) const { SmallVector stringFloatRepr; getFloatValue().toString(stringFloatRepr); os << "float: " << stringFloatRepr << "\n"; + return; } case RK_String: os << "string: \"" << getStringValue() << "\"\n";