From 5ce14265e43e03497f84ffccc00b3fc525342d8a Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Thu, 29 Jun 2023 16:24:34 -0400 Subject: [PATCH] Fix some random compiler warnings --- include/swift/AST/PrintOptions.h | 4 ++-- lib/AST/Module.cpp | 1 + lib/ConstExtract/ConstExtract.cpp | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/swift/AST/PrintOptions.h b/include/swift/AST/PrintOptions.h index cb43234e45129..3c595738892a9 100644 --- a/include/swift/AST/PrintOptions.h +++ b/include/swift/AST/PrintOptions.h @@ -573,12 +573,12 @@ struct PrintOptions { QualifyNestedDeclarations::Never; /// If true, we print a protocol's primary associated types using the - /// primary associated type syntax: protocol Foo. + /// primary associated type syntax: `protocol Foo`. /// /// If false, we print them as ordinary associated types. bool PrintPrimaryAssociatedTypes = true; - /// Whether or not to print \c @attached(extension) attributes on + /// Whether or not to print `@attached(extension)` attributes on /// macro declarations. This is used for feature suppression in /// Swift interface printing. bool PrintExtensionMacroAttributes = true; diff --git a/lib/AST/Module.cpp b/lib/AST/Module.cpp index 8a6f705efc9a1..efddbe35aca2f 100644 --- a/lib/AST/Module.cpp +++ b/lib/AST/Module.cpp @@ -554,6 +554,7 @@ void SourceLookupCache::lookupVisibleDecls(ImportPath::Access AccessPath, SmallVector unexpandedDecls; for (auto &entry : TopLevelAuxiliaryDecls) { for (auto &decl : entry.second) { + (void) decl; unexpandedDecls.append(entry.second.begin(), entry.second.end()); } } diff --git a/lib/ConstExtract/ConstExtract.cpp b/lib/ConstExtract/ConstExtract.cpp index 094190a8ab1ef..fd01a86dce449 100644 --- a/lib/ConstExtract/ConstExtract.cpp +++ b/lib/ConstExtract/ConstExtract.cpp @@ -815,7 +815,6 @@ void writeParameterizedProtocolSameTypeRequirements( llvm::json::OStream &JSON, const ParameterizedProtocolType &ParameterizedProtoTy) { auto Protocol = ParameterizedProtoTy.getProtocol(); - auto ProtocolTy = ParameterizedProtoTy.getBaseType(); auto Requirements = Protocol->getProtocolRequirements(); auto ParameterTypeNames = Protocol->getPrimaryAssociatedTypeNames(); auto ProtocolArguments = ParameterizedProtoTy.getArgs();