]> granicus.if.org Git - clang/commitdiff
Added FIXME.
authorTed Kremenek <kremenek@apple.com>
Mon, 3 Mar 2008 16:47:31 +0000 (16:47 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 3 Mar 2008 16:47:31 +0000 (16:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47842 91177308-0d34-0410-b5e6-96231b3b80d8

Analysis/GRExprEngine.cpp

index 29330da7ebb6a6c7a0093463100074dda2413dfa..415c616bf90287fd56951327d132660130d3c45f 100644 (file)
@@ -508,11 +508,14 @@ void GRExprEngine::VisitCall(CallExpr* CE, NodeTy* Pred,
 
   // If we reach here we have processed all of the arguments.  Evaluate
   // the callee expression.
+  
   NodeSet DstTmp;    
   Expr* Callee = CE->getCallee()->IgnoreParenCasts();
-  
+
   VisitLVal(Callee, Pred, DstTmp);
-  if (DstTmp.empty()) DstTmp.Add(Pred);
+  
+  if (DstTmp.empty())
+    DstTmp.Add(Pred);
   
   // Finally, evaluate the function call.
   for (NodeSet::iterator DI = DstTmp.begin(), DE = DstTmp.end(); DI!=DE; ++DI) {
@@ -520,8 +523,11 @@ void GRExprEngine::VisitCall(CallExpr* CE, NodeTy* Pred,
     ValueState* St = (*DI)->getState();    
     RVal L = GetLVal(St, Callee);
 
-    // Check for undefined control-flow.
-
+    // FIXME: Add support for symbolic function calls (calls involving
+    //  function pointer values that are symbolic).
+    
+    // Check for undefined control-flow or calls to NULL.
+    
     if (L.isUndef() || isa<lval::ConcreteInt>(L)) {      
       NodeTy* N = Builder->generateNode(CE, St, *DI);
       if (N) {
@@ -529,7 +535,9 @@ void GRExprEngine::VisitCall(CallExpr* CE, NodeTy* Pred,
         BadCalls.insert(N);
       }
       continue;
-    }
+    }  
+    
+    // Check for an "unknown" callee.
     
     if (L.isUnknown()) {
       // Invalidate all arguments passed in by reference (LVals).
@@ -539,7 +547,7 @@ void GRExprEngine::VisitCall(CallExpr* CE, NodeTy* Pred,
 
         if (isa<LVal>(V))
           St = SetRVal(St, cast<LVal>(V), UnknownVal());
-      }
+      }      
     }
     else
       St = EvalCall(CE, cast<LVal>(L), (*DI)->getState());