Author: Kazu Hirata Date: 2021-01-13T13:32:40-08:00 New Revision: fb98a1be43645c87fff089c4cc9555ca2400268c
URL: https://github.com/llvm/llvm-project/commit/fb98a1be43645c87fff089c4cc9555ca2400268c DIFF: https://github.com/llvm/llvm-project/commit/fb98a1be43645c87fff089c4cc9555ca2400268c.diff LOG: Fix the warnings on unused variables (NFC) Added: Modified: clang-tools-extra/clangd/AST.cpp lld/MachO/InputSection.cpp llvm/lib/Transforms/Coroutines/CoroFrame.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clangd/AST.cpp b/clang-tools-extra/clangd/AST.cpp index 8af4cbb19a3d..aecaf7e6b8f7 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<TagDecl>(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 4cb322a058f9..9287d49dae3c 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<Defined>(referentSym)) + if (isa<Defined>(referentSym)) referentVA -= firstTLVDataSection->addr; } } else if (auto *referentIsec = r.referent.dyn_cast<InputSection *>()) { diff --git a/llvm/lib/Transforms/Coroutines/CoroFrame.cpp b/llvm/lib/Transforms/Coroutines/CoroFrame.cpp index 4823eea4154f..84b78fce3f44 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; } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits