diff --git a/clang-tools-extra/clangd/AST.cpp b/clang-tools-extra/clangd/AST.cpp index 8af4cbb19a3d5a..aecaf7e6b8f7ad 100644 --- a/clang-tools-extra/clangd/AST.cpp +++ b/clang-tools-extra/clangd/AST.cpp @@ -116,6 +116,7 @@ getQualification(ASTContext &Context, const DeclContext *DestContext, if (auto *TD = llvm::dyn_cast(CurContext)) { // There can't be any more tag parents after hitting a namespace. assert(!ReachedNS); + (void)ReachedNS; NNS = NestedNameSpecifier::Create(Context, nullptr, false, TD->getTypeForDecl()); } else { diff --git a/lld/MachO/InputSection.cpp b/lld/MachO/InputSection.cpp index 4cb322a058f9c4..9287d49dae3cc9 100644 --- a/lld/MachO/InputSection.cpp +++ b/lld/MachO/InputSection.cpp @@ -50,7 +50,7 @@ void InputSection::writeTo(uint8_t *buf) { // relative to the start of the thread-local data memory area, which // is initialized via copying all the TLV data sections (which are all // contiguous). - if (auto *defined = dyn_cast(referentSym)) + if (isa(referentSym)) referentVA -= firstTLVDataSection->addr; } } else if (auto *referentIsec = r.referent.dyn_cast()) { diff --git a/llvm/lib/Transforms/Coroutines/CoroFrame.cpp b/llvm/lib/Transforms/Coroutines/CoroFrame.cpp index 4823eea4154f3c..84b78fce3f448d 100644 --- a/llvm/lib/Transforms/Coroutines/CoroFrame.cpp +++ b/llvm/lib/Transforms/Coroutines/CoroFrame.cpp @@ -1538,6 +1538,7 @@ static void rewritePHIs(BasicBlock &BB) { // CleanupPad with a CatchSwitch predecessor: therefore this is an // unwind destination that needs to be handle specially. assert(CS->getUnwindDest() == &BB); + (void)CS; rewritePHIsForCleanupPad(&BB, CleanupPad); return; }