[cfe-commits] r47842 - /cfe/trunk/Analysis/GRExprEngine.cpp
Ted Kremenek
kremenek at apple.com
Mon Mar 3 08:47:31 PST 2008
Author: kremenek
Date: Mon Mar 3 10:47:31 2008
New Revision: 47842
URL: http://llvm.org/viewvc/llvm-project?rev=47842&view=rev
Log:
Added FIXME.
Modified:
cfe/trunk/Analysis/GRExprEngine.cpp
Modified: cfe/trunk/Analysis/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Analysis/GRExprEngine.cpp?rev=47842&r1=47841&r2=47842&view=diff
==============================================================================
--- cfe/trunk/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/Analysis/GRExprEngine.cpp Mon Mar 3 10:47:31 2008
@@ -508,11 +508,14 @@
// 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 @@
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 @@
BadCalls.insert(N);
}
continue;
- }
+ }
+
+ // Check for an "unknown" callee.
if (L.isUnknown()) {
// Invalidate all arguments passed in by reference (LVals).
@@ -539,7 +547,7 @@
if (isa<LVal>(V))
St = SetRVal(St, cast<LVal>(V), UnknownVal());
- }
+ }
}
else
St = EvalCall(CE, cast<LVal>(L), (*DI)->getState());
More information about the cfe-commits
mailing list