]> granicus.if.org Git - clang/commitdiff
Fix MSVC "not all control paths return a value" warning. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 18 Jan 2019 20:40:35 +0000 (20:40 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 18 Jan 2019 20:40:35 +0000 (20:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351588 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp

index b7a866d3ff857a1f265e7b53929a2383232d70e1..f546112f96096ea4173f534112e7c4339f062697 100644 (file)
@@ -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)