]> granicus.if.org Git - clang/commitdiff
[analyzer] Corrected the switch statement.
authorAnton Yartsev <anton.yartsev@gmail.com>
Fri, 5 Apr 2013 02:12:04 +0000 (02:12 +0000)
committerAnton Yartsev <anton.yartsev@gmail.com>
Fri, 5 Apr 2013 02:12:04 +0000 (02:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178831 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Checkers/MallocChecker.cpp

index f92178f6fc774f78e38d7503d5441a4b4b260f5d..1e18792d890ae5322d71b50b7e9a5ecfe488f7e0 100644 (file)
@@ -1072,22 +1072,19 @@ bool MallocChecker::isTrackedFamily(AllocationFamily Family) const {
   case AF_Malloc: {
     if (!Filter.CMallocOptimistic && !Filter.CMallocPessimistic)
       return false;
-    break;  
+    return true;
   }
   case AF_CXXNew:
   case AF_CXXNewArray: {
     if (!Filter.CNewDeleteChecker)
       return false;
-    break;
+    return true;
   }
   case AF_None: {
     return true;
   }
-  default:
-    llvm_unreachable("unhandled family");
   }
-
-  return true;
+  llvm_unreachable("unhandled family");
 }
 
 bool MallocChecker::isTrackedFamily(CheckerContext &C,