]> granicus.if.org Git - clang/commitdiff
[analyzer] Fix unnecessary dyn_cast_or_null. No functionality change.
authorJordy Rose <jediknil@belkadan.com>
Tue, 6 Mar 2012 00:28:20 +0000 (00:28 +0000)
committerJordy Rose <jediknil@belkadan.com>
Tue, 6 Mar 2012 00:28:20 +0000 (00:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152078 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Checkers/MallocChecker.cpp

index 4309045459e35c3e38dc95ba93f288b42f84910a..8a704760e4d63b70a7c3a393ff1aca60cbcc2af7 100644 (file)
@@ -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)