aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-03-03 16:47:31 +0000
committerTed Kremenek <kremenek@apple.com>2008-03-03 16:47:31 +0000
commita1354a5448cbc96decb7b3562edca0eaec875bcd (patch)
tree841c7eeea5ebd3d14e3be7bd7dddabbcca58d523
parent15f362283e2985032068cd46166cbb8930986271 (diff)
Added FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47842 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--Analysis/GRExprEngine.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/Analysis/GRExprEngine.cpp b/Analysis/GRExprEngine.cpp
index 29330da7eb..415c616bf9 100644
--- a/Analysis/GRExprEngine.cpp
+++ b/Analysis/GRExprEngine.cpp
@@ -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());