[clang-tools-extra] 617fc0b - [clangd] Remove unused variable [NFC]

Mikael Holmen via cfe-commits cfe-commits at lists.llvm.org
Thu May 4 00:58:51 PDT 2023


Author: Mikael Holmen
Date: 2023-05-04T09:58:05+02:00
New Revision: 617fc0b9fe55a54c7a7f655d992a470d42032a91

URL: https://github.com/llvm/llvm-project/commit/617fc0b9fe55a54c7a7f655d992a470d42032a91
DIFF: https://github.com/llvm/llvm-project/commit/617fc0b9fe55a54c7a7f655d992a470d42032a91.diff

LOG: [clangd] Remove unused variable [NFC]

gcc warned with
 ../../clang-tools-extra/clangd/Protocol.cpp:481:23: warning: unused variable 'ChangeAnnotation' [-Wunused-variable]
   481 |       if (const auto& ChangeAnnotation =
       |                       ^~~~~~~~~~~~~~~~

Added: 
    

Modified: 
    clang-tools-extra/clangd/Protocol.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/Protocol.cpp b/clang-tools-extra/clangd/Protocol.cpp
index 465b5fc3d69cf..f613624cd25d8 100644
--- a/clang-tools-extra/clangd/Protocol.cpp
+++ b/clang-tools-extra/clangd/Protocol.cpp
@@ -478,8 +478,7 @@ bool fromJSON(const llvm::json::Value &Params, ClientCapabilities &R,
     if (auto *WorkspaceEdit = Workspace->getObject("workspaceEdit")) {
       if (auto DocumentChanges = WorkspaceEdit->getBoolean("documentChanges"))
         R.DocumentChanges = *DocumentChanges;
-      if (const auto& ChangeAnnotation =
-              WorkspaceEdit->getObject("changeAnnotationSupport")) {
+      if (WorkspaceEdit->getObject("changeAnnotationSupport")) {
         R.ChangeAnnotation = true;
       }
     }


        


More information about the cfe-commits mailing list