]> granicus.if.org Git - clang/commitdiff
Better handling of calls to functions via function pointers.
authorTed Kremenek <kremenek@apple.com>
Mon, 25 Feb 2008 21:16:03 +0000 (21:16 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 25 Feb 2008 21:16:03 +0000 (21:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47562 91177308-0d34-0410-b5e6-96231b3b80d8

Analysis/GRExprEngine.cpp

index dedeb7b1b709a74206a9b5330f31a9515897804e..4e6d1a3f6b30fa6b4f5911e99fe6452a50dd0ee7 100644 (file)
@@ -429,14 +429,16 @@ void GRExprEngine::VisitCall(CallExpr* CE, NodeTy* Pred,
 
   // If we reach here we have processed all of the arguments.  Evaluate
   // the callee expression.
-  NodeSet DstTmp;  
-  Visit(CE->getCallee(), Pred, DstTmp);
+  NodeSet DstTmp;    
+  Expr* Callee = CE->getCallee()->IgnoreParenCasts();
+  
+  VisitLVal(Callee, Pred, DstTmp);
   
   // Finally, evaluate the function call.
   for (NodeSet::iterator DI = DstTmp.begin(), DE = DstTmp.end(); DI!=DE; ++DI) {
 
     StateTy St = (*DI)->getState();    
-    RVal L = GetLVal(St, CE->getCallee());
+    RVal L = GetLVal(St, Callee);
 
     // Check for uninitialized control-flow.