[cfe-commits] r152078 - /cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp

Jordy Rose jediknil at belkadan.com
Mon Mar 5 16:28:20 PST 2012


Author: jrose
Date: Mon Mar  5 18:28:20 2012
New Revision: 152078

URL: http://llvm.org/viewvc/llvm-project?rev=152078&view=rev
Log:
[analyzer] Fix unnecessary dyn_cast_or_null. No functionality change.

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=152078&r1=152077&r2=152078&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp Mon Mar  5 18:28:20 2012
@@ -1086,7 +1086,7 @@
   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 @@
     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)





More information about the cfe-commits mailing list