Skip to content

Commit 559ae7f

Browse files
authored
Merge pull request #62981 from atrick/fix-warnings
Fix compiler warnings.
2 parents 892ed0e + 567103e commit 559ae7f

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

lib/Basic/SourceLoc.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ void SourceManager::verifyAllBuffers() const {
3232
arbitraryTotal += buffer->getBufferStart()[0];
3333
arbitraryTotal += buffer->getBufferEnd()[-1];
3434
}
35+
(void)arbitraryTotal;
3536
}
3637

3738
SourceLoc SourceManager::getIDEInspectionTargetLoc() const {

lib/Parse/ParseDecl.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,14 @@ extern "C" void parseTopLevelSwift(const char *buffer,
162162
void *outputContext,
163163
void (*)(void *, void *));
164164

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

169170
vec->push_back(decl);
170171
}
172+
#endif
171173

172174
/// Parse a source file.
173175
extern "C" void *swift_ASTGen_parseSourceFile(const char *buffer,

lib/Sema/TypeCheckMacros.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ static std::string mangledNameForTypeMetadataAccessor(
7979
return mangleResult.result();
8080
}
8181

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

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

0 commit comments

Comments
 (0)