r351588 - Fix MSVC "not all control paths return a value" warning. NFCI.

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 18 12:40:36 PST 2019


Author: rksimon
Date: Fri Jan 18 12:40:35 2019
New Revision: 351588

URL: http://llvm.org/viewvc/llvm-project?rev=351588&view=rev
Log:
Fix MSVC "not all control paths return a value" warning. NFCI.

Modified:
    cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp?rev=351588&r1=351587&r2=351588&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp Fri Jan 18 12:40:35 2019
@@ -38,6 +38,7 @@ StringRef RefCountBug::bugTypeToName(Ref
   case LeakAtReturn:
     return "Leak of returned object";
   }
+  llvm_unreachable("Unknown RefCountBugType");
 }
 
 StringRef RefCountBug::getDescription() const {
@@ -60,6 +61,7 @@ StringRef RefCountBug::getDescription()
   case LeakAtReturn:
     return "";
   }
+  llvm_unreachable("Unknown RefCountBugType");
 }
 
 RefCountBug::RefCountBug(const CheckerBase *Checker, RefCountBugType BT)




More information about the cfe-commits mailing list