Author: Yang Fan Date: 2021-06-01T16:15:09+08:00 New Revision: 5b747197f8fb83bb7c256fa6cb2010445deb0a85
URL: https://github.com/llvm/llvm-project/commit/5b747197f8fb83bb7c256fa6cb2010445deb0a85 DIFF: https://github.com/llvm/llvm-project/commit/5b747197f8fb83bb7c256fa6cb2010445deb0a85.diff LOG: [clangd] Fix -Wunused-variable warning (NFC) GCC warning: ``` /llvm-project/clang-tools-extra/clangd/InlayHints.cpp: In member function ‘bool clang::clangd::InlayHintVisitor::VisitVarDecl(clang::VarDecl*)’: /llvm-project/clang-tools-extra/clangd/InlayHints.cpp:81:15: warning: unused variable ‘AT’ [-Wunused-variable] 81 | if (auto *AT = D->getType()->getContainedAutoType()) { | ^~ ``` Added: Modified: clang-tools-extra/clangd/InlayHints.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clangd/InlayHints.cpp b/clang-tools-extra/clangd/InlayHints.cpp index 9fbce419edd2..d0e0e961abcf 100644 --- a/clang-tools-extra/clangd/InlayHints.cpp +++ b/clang-tools-extra/clangd/InlayHints.cpp @@ -78,7 +78,7 @@ class InlayHintVisitor : public RecursiveASTVisitor<InlayHintVisitor> { if (isa<DecompositionDecl>(D)) return true; - if (auto *AT = D->getType()->getContainedAutoType()) { + if (D->getType()->getContainedAutoType()) { if (!D->getType()->isDependentType()) { // Our current approach is to place the hint on the variable // and accordingly print the full type _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits