[analyzer] Fix unnecessary dyn_cast_or_null. No functionality change.

llvm-svn: 152078
This commit is contained in:
Jordy Rose 2012-03-06 00:28:20 +00:00
parent e16e2d02ea
commit 0accc6ae7b
1 changed files with 2 additions and 2 deletions

View File

@ -1086,7 +1086,7 @@ bool MallocChecker::doesNotFreeMemory(const CallOrObjCMessage *Call,
ASTContext &ASTC = State->getStateManager().getContext(); ASTContext &ASTC = State->getStateManager().getContext();
// If it's one of the allocation functions we can reason about, we model // 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)) { if (isa<FunctionDecl>(D) && isMemFunction(cast<FunctionDecl>(D), ASTC)) {
return true; return true;
} }
@ -1097,7 +1097,7 @@ bool MallocChecker::doesNotFreeMemory(const CallOrObjCMessage *Call,
return false; return false;
// Process C/ObjC functions. // 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. // White list the system functions whose arguments escape.
const IdentifierInfo *II = FD->getIdentifier(); const IdentifierInfo *II = FD->getIdentifier();
if (!II) if (!II)