Skip to content

Fix compiler warnings. #62981

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 1 commit into from
Jan 13, 2023
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
1 change: 1 addition & 0 deletions lib/Basic/SourceLoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ void SourceManager::verifyAllBuffers() const {
arbitraryTotal += buffer->getBufferStart()[0];
arbitraryTotal += buffer->getBufferEnd()[-1];
}
(void)arbitraryTotal;
}

SourceLoc SourceManager::getIDEInspectionTargetLoc() const {
Expand Down
2 changes: 2 additions & 0 deletions lib/Parse/ParseDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,14 @@ extern "C" void parseTopLevelSwift(const char *buffer,
void *outputContext,
void (*)(void *, void *));

#if SWIFT_SWIFT_PARSER
static void appendToVector(void *declPtr, void *vecPtr) {
auto vec = static_cast<SmallVectorImpl<ASTNode> *>(vecPtr);
auto decl = static_cast<Decl *>(declPtr);

vec->push_back(decl);
}
#endif

/// Parse a source file.
extern "C" void *swift_ASTGen_parseSourceFile(const char *buffer,
Expand Down
2 changes: 2 additions & 0 deletions lib/Sema/TypeCheckMacros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ static std::string mangledNameForTypeMetadataAccessor(
return mangleResult.result();
}

#if SWIFT_SWIFT_PARSER
/// Look for macro's type metadata given its external module and type name.
static void const *lookupMacroTypeMetadataByExternalName(
ASTContext &ctx, StringRef moduleName, StringRef typeName) {
Expand Down Expand Up @@ -106,6 +107,7 @@ static void const *lookupMacroTypeMetadataByExternalName(
auto accessor = reinterpret_cast<MetadataAccessFunc*>(accessorAddr);
return accessor(MetadataRequest(MetadataState::Complete));
}
#endif

/// Handle the "A.B" spelling of an external macro definition, from early
/// pitches of the expression-macros proposal, which is also used as the syntax
Expand Down