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

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 5 02:48:12 PDT 2020


Author: Simon Pilgrim
Date: 2020-06-05T10:45:59+01:00
New Revision: a30b5c5a51f95dc81fdfbeea42cc01b451cd5a08

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

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

Add llvm_unreachable after switch statement for TestLanguage enum

Added: 
    

Modified: 
    clang/lib/Testing/CommandLineArgs.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Testing/CommandLineArgs.cpp b/clang/lib/Testing/CommandLineArgs.cpp
index 7375dbc6ee70..cd4d8c188da9 100644
--- a/clang/lib/Testing/CommandLineArgs.cpp
+++ b/clang/lib/Testing/CommandLineArgs.cpp
@@ -64,6 +64,7 @@ StringRef getFilenameForTesting(TestLanguage Lang) {
   case Lang_OBJCXX:
     return "input.mm";
   }
+  llvm_unreachable("Unhandled TestLanguage enum");
 }
 
 } // end namespace clang


        


More information about the cfe-commits mailing list