[clang-tools-extra] 2743322 - [clangd] Fix a few gcc warnings [NFC]

Mikael Holmen via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 16 01:16:01 PDT 2020


Author: Mikael Holmen
Date: 2020-07-16T09:36:17+02:00
New Revision: 274332282cb4ce167de8e73fb9c59d2eecd67c25

URL: https://github.com/llvm/llvm-project/commit/274332282cb4ce167de8e73fb9c59d2eecd67c25
DIFF: https://github.com/llvm/llvm-project/commit/274332282cb4ce167de8e73fb9c59d2eecd67c25.diff

LOG: [clangd] Fix a few gcc warnings [NFC]

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/CompileCommands.cpp b/clang-tools-extra/clangd/CompileCommands.cpp
index 473122157cac..f6210a43b34e 100644
--- a/clang-tools-extra/clangd/CompileCommands.cpp
+++ b/clang-tools-extra/clangd/CompileCommands.cpp
@@ -271,6 +271,7 @@ std::pair<unsigned, unsigned> getArgCount(const llvm::opt::Option &Opt) {
   case Option::RemainingArgsJoinedClass:
     return {Rest, Rest};
   }
+  llvm_unreachable("Unhandled option kind");
 }
 
 // Flag-parsing mode, which affects which flags are available.
@@ -321,7 +322,7 @@ unsigned char getModes(const llvm::opt::Option &Opt) {
     }
   }
   return Result;
-};
+}
 
 } // namespace
 
@@ -475,7 +476,7 @@ void ArgStripper::process(std::vector<std::string> &Args) const {
   bool WasXclang = false;
   while (Read < Args.size()) {
     unsigned ArgCount = 0;
-    if (const Rule *R = matchingRule(Args[Read], CurrentMode, ArgCount)) {
+    if (matchingRule(Args[Read], CurrentMode, ArgCount)) {
       // Delete it and its args.
       if (WasXclang) {
         assert(Write > 0);


        


More information about the cfe-commits mailing list