From: Simon Pilgrim Date: Fri, 18 Jan 2019 20:40:35 +0000 (+0000) Subject: Fix MSVC "not all control paths return a value" warning. NFCI. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6b916c6814c961fd1d5070667b29102b1a928e80;p=clang Fix MSVC "not all control paths return a value" warning. NFCI. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351588 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp b/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp index b7a866d3ff..f546112f96 100644 --- a/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp +++ b/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp @@ -38,6 +38,7 @@ StringRef RefCountBug::bugTypeToName(RefCountBug::RefCountBugType BT) { case LeakAtReturn: return "Leak of returned object"; } + llvm_unreachable("Unknown RefCountBugType"); } StringRef RefCountBug::getDescription() const { @@ -60,6 +61,7 @@ StringRef RefCountBug::getDescription() const { case LeakAtReturn: return ""; } + llvm_unreachable("Unknown RefCountBugType"); } RefCountBug::RefCountBug(const CheckerBase *Checker, RefCountBugType BT)