зеркало из https://github.com/microsoft/clang-1.git
Added transfer function support for dispatching to functions we don't know
about. The default logic is to invalidate the values of all values passed-by-reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47456 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
86e07b6c25
Коммит
03da0d7eaa
|
@ -448,10 +448,20 @@ void GRExprEngine::VisitCall(CallExpr* CE, NodeTy* Pred,
|
|||
continue;
|
||||
}
|
||||
|
||||
// FIXME: EvalCall must handle the case where the callee is Unknown.
|
||||
assert (!L.isUnknown());
|
||||
if (L.isUnknown()) {
|
||||
// Invalidate all arguments passed in by reference (LVals).
|
||||
for (CallExpr::arg_iterator I = CE->arg_begin(), E = CE->arg_end();
|
||||
I != E; ++I) {
|
||||
RVal V = GetRVal(St, *I);
|
||||
|
||||
Nodify(Dst, CE, *DI, EvalCall(CE, cast<LVal>(L), (*DI)->getState()));
|
||||
if (isa<LVal>(V))
|
||||
St = SetRVal(St, cast<LVal>(V), UnknownVal());
|
||||
}
|
||||
}
|
||||
else
|
||||
St = EvalCall(CE, cast<LVal>(L), (*DI)->getState());
|
||||
|
||||
Nodify(Dst, CE, *DI, St);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче