summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
diff options
context:
space:
mode:
authorJordy Rose <jediknil@belkadan.com>2012-03-06 00:28:20 +0000
committerJordy Rose <jediknil@belkadan.com>2012-03-06 00:28:20 +0000
commit0accc6ae7bd70abe8d3aff38f5c500c38007f91c (patch)
tree1fe48e712ff2684ef6ccea988979e063e822f41a /clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
parente16e2d02eac0293651338872b98b8a927a9b3f68 (diff)
downloadbcm5719-llvm-0accc6ae7bd70abe8d3aff38f5c500c38007f91c.tar.gz
bcm5719-llvm-0accc6ae7bd70abe8d3aff38f5c500c38007f91c.zip
[analyzer] Fix unnecessary dyn_cast_or_null. No functionality change.
llvm-svn: 152078
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
index 4309045459e..8a704760e4d 100644
--- a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
@@ -1086,7 +1086,7 @@ bool MallocChecker::doesNotFreeMemory(const CallOrObjCMessage *Call,
ASTContext &ASTC = State->getStateManager().getContext();
// If it's one of the allocation functions we can reason about, we model
- // it's behavior explicitly.
+ // its behavior explicitly.
if (isa<FunctionDecl>(D) && isMemFunction(cast<FunctionDecl>(D), ASTC)) {
return true;
}
@@ -1097,7 +1097,7 @@ bool MallocChecker::doesNotFreeMemory(const CallOrObjCMessage *Call,
return false;
// Process C/ObjC functions.
- if (const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(D)) {
+ if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
// White list the system functions whose arguments escape.
const IdentifierInfo *II = FD->getIdentifier();
if (!II)
OpenPOWER on IntegriCloud