[clang] e6ba0a5 - Fix MSVC "not all control paths return a value" warning. NFC.

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 3 03:13:03 PDT 2020


Author: Simon Pilgrim
Date: 2020-06-03T11:12:43+01:00
New Revision: e6ba0a55fd39b600f3f431308f4a7e36e48f91ae

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

LOG: Fix MSVC "not all control paths return a value" warning. NFC.

Add llvm_unreachable after switch statement for CheckerRegistry::StateFromCmdLine enum

Added: 
    

Modified: 
    clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp b/clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp
index f4d5db1e7a4b..401cd1d57bb3 100644
--- a/clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp
+++ b/clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp
@@ -112,6 +112,7 @@ static StringRef toString(CheckerRegistry::StateFromCmdLine Kind) {
   case CheckerRegistry::StateFromCmdLine::State_Unspecified:
     return "Unspecified";
   }
+  llvm_unreachable("Unhandled CheckerRegistry::StateFromCmdLine enum");
 }
 
 LLVM_DUMP_METHOD void


        


More information about the cfe-commits mailing list