Skip to content

Fix various warnings #81946

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/AST/Availability.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ bool AvailabilityInference::updateBeforeAvailabilityDomainForFallback(
auto potentiallyRemappedIntroducedVersion =
getRemappedIntroducedVersionForFallbackPlatform(ctx, beforeVersion);
if (potentiallyRemappedIntroducedVersion.has_value()) {
domain = AvailabilityDomain::forPlatform(PlatformKind::visionOS);
domain = remappedDomain;
platformVer = potentiallyRemappedIntroducedVersion.value();
return true;
}
Expand Down
16 changes: 8 additions & 8 deletions lib/ASTGen/Sources/ASTGen/DeclAttrs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1877,19 +1877,19 @@ extension ASTGenVisitor {
/// ```
func generateSpecializedAttr(attribute node: AttributeSyntax, attrName: SyntaxText) -> BridgedSpecializedAttr? {
guard
var arg = node.arguments?.as(SpecializedAttributeArgumentSyntax.self)
let arg = node.arguments?.as(SpecializedAttributeArgumentSyntax.self)
else {
// TODO: Diagnose
return nil
}
var exported: Bool?
var kind: BridgedSpecializationKind? = nil
let exported: Bool? = nil
let kind: BridgedSpecializationKind? = nil
var whereClause: BridgedTrailingWhereClause? = nil
var targetFunction: BridgedDeclNameRef? = nil
var spiGroups: [BridgedIdentifier] = []
var availableAttrs: [BridgedAvailableAttr] = []
let targetFunction: BridgedDeclNameRef? = nil
let spiGroups: [BridgedIdentifier] = []
let availableAttrs: [BridgedAvailableAttr] = []

whereClause = self.generate(genericWhereClause: arg.genericWhereClause)
whereClause = self.generate(genericWhereClause: arg.genericWhereClause)

return .createParsed(
self.ctx,
Expand Down Expand Up @@ -1925,7 +1925,7 @@ extension ASTGenVisitor {
while let arg = args.popFirst() {
switch arg {
case .genericWhereClause(let arg):
whereClause = self.generate(genericWhereClause: arg)
whereClause = self.generate(genericWhereClause: arg)
case .specializeTargetFunctionArgument(let arg):
if targetFunction != nil {
// TODO: Diangose.
Expand Down
2 changes: 1 addition & 1 deletion lib/Parse/ParseDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ bool Parser::parseSpecializeAttributeArguments(
if (Tok.is(tok::kw_where)) {
SourceLoc whereLoc, endLoc;
SmallVector<RequirementRepr, 4> requirements;
auto status = parseGenericWhereClause(whereLoc, endLoc, requirements,
parseGenericWhereClause(whereLoc, endLoc, requirements,
/* AllowLayoutConstraints */ !isPublic);
TrailingWhereClause =
TrailingWhereClause::create(Context, whereLoc, endLoc, requirements);
Expand Down