Author: Simon Pilgrim Date: 2020-02-21T18:23:55Z New Revision: 1723f219939e1d4dc1c53ec7caf10c9380822b99
URL: https://github.com/llvm/llvm-project/commit/1723f219939e1d4dc1c53ec7caf10c9380822b99 DIFF: https://github.com/llvm/llvm-project/commit/1723f219939e1d4dc1c53ec7caf10c9380822b99.diff LOG: Fix MSVC "not all control paths return a value" warning. NFCI. Added: Modified: clang/lib/ASTMatchers/GtestMatchers.cpp Removed: ################################################################################ diff --git a/clang/lib/ASTMatchers/GtestMatchers.cpp b/clang/lib/ASTMatchers/GtestMatchers.cpp index 317bddd035f8..c99fdf6c0fcd 100644 --- a/clang/lib/ASTMatchers/GtestMatchers.cpp +++ b/clang/lib/ASTMatchers/GtestMatchers.cpp @@ -38,6 +38,7 @@ static DeclarationMatcher getComparisonDecl(GtestCmp Cmp) { case GtestCmp::Lt: return functionDecl(hasName("::testing::internal::CmpHelperLT")); } + llvm_unreachable("Unhandled GtestCmp enum"); } static llvm::StringRef getAssertMacro(GtestCmp Cmp) { @@ -55,6 +56,7 @@ static llvm::StringRef getAssertMacro(GtestCmp Cmp) { case GtestCmp::Lt: return "ASSERT_LT"; } + llvm_unreachable("Unhandled GtestCmp enum"); } static llvm::StringRef getExpectMacro(GtestCmp Cmp) { @@ -72,6 +74,7 @@ static llvm::StringRef getExpectMacro(GtestCmp Cmp) { case GtestCmp::Lt: return "EXPECT_LT"; } + llvm_unreachable("Unhandled GtestCmp enum"); } // In general, AST matchers cannot match calls to macros. However, we can _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits