r178831 - [analyzer] Corrected the switch statement.
Anton Yartsev
anton.yartsev at gmail.com
Thu Apr 4 19:12:04 PDT 2013
Author: ayartsev
Date: Thu Apr 4 21:12:04 2013
New Revision: 178831
URL: http://llvm.org/viewvc/llvm-project?rev=178831&view=rev
Log:
[analyzer] Corrected the switch statement.
Modified:
cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp?rev=178831&r1=178830&r2=178831&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp Thu Apr 4 21:12:04 2013
@@ -1072,22 +1072,19 @@ bool MallocChecker::isTrackedFamily(Allo
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,
More information about the cfe-commits
mailing list