Skip to content

Commit a1adf9f

Browse files
Squash a few more unused warnings (#17743)
1 parent f4359b7 commit a1adf9f

File tree

5 files changed

+7
-1
lines changed

5 files changed

+7
-1
lines changed

lib/Basic/Mangler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ void Mangler::finalize(llvm::raw_ostream &stream) {
144144
stream.write(result.data(), result.size());
145145
}
146146

147-
147+
LLVM_ATTRIBUTE_UNUSED
148148
static bool treeContains(Demangle::NodePointer Nd, Demangle::Node::Kind Kind) {
149149
if (Nd->getKind() == Kind)
150150
return true;

lib/ClangImporter/IAMInference.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,7 @@ IAMResult IAMInference::inferVar(const clang::VarDecl *varDecl) {
690690
auto fail = [varDecl]() -> IAMResult {
691691
DEBUG(llvm::dbgs() << "failed to infer variable: ");
692692
DEBUG(varDecl->print(llvm::dbgs()));
693+
(void)varDecl;
693694
DEBUG(llvm::dbgs() << "\n");
694695
++FailInferVar;
695696
return {};
@@ -733,6 +734,7 @@ IAMResult IAMInference::infer(const clang::NamedDecl *clangDecl) {
733734
auto fail = [funcDecl]() -> IAMResult {
734735
DEBUG(llvm::dbgs() << "failed to infer function: ");
735736
DEBUG(funcDecl->print(llvm::dbgs()));
737+
(void)funcDecl;
736738
DEBUG(llvm::dbgs() << "\n");
737739
++FailInferFunction;
738740
return {};

lib/IRGen/GenOpaque.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,7 @@ void IRGenFunction::emitDeallocateDynamicAlloca(StackAddress address) {
482482
if (isCoroutine()) {
483483
auto allocToken = address.getExtraInfo();
484484
assert(allocToken && "dynamic alloca in coroutine without alloc token?");
485+
(void)allocToken;
485486
auto freeFn = llvm::Intrinsic::getDeclaration(
486487
&IGM.Module, llvm::Intrinsic::ID::coro_alloca_free);
487488
Builder.CreateCall(freeFn, address.getAddressPointer());

lib/SILGen/RValue.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ static void copyOrInitValuesInto(Initialization *init,
377377
init->finishInitialization(SGF);
378378
}
379379

380+
LLVM_ATTRIBUTE_UNUSED
380381
static unsigned
381382
expectedExplosionSize(CanType type) {
382383
auto tuple = dyn_cast<TupleType>(type);

lib/Sema/TypeCheckDeclOverride.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,8 @@ SmallVector<OverrideMatch, 2> OverrideMatcher::match(
660660
auto parentMethod = dyn_cast<AbstractFunctionDecl>(parentDecl);
661661
auto parentStorage = dyn_cast<AbstractStorageDecl>(parentDecl);
662662
assert(parentMethod || parentStorage);
663+
(void)parentMethod;
664+
(void)parentStorage;
663665

664666
// Check whether the types are identical.
665667
auto parentDeclTy = getMemberTypeForComparison(ctx, parentDecl, decl);

0 commit comments

Comments
 (0)