Return "Unknown" when using the value of a function pointer whose value

is symbolic.

llvm-svn: 47463
This commit is contained in:
Ted Kremenek 2008-02-21 23:17:39 +00:00
parent 35519d51d6
commit eb653882de
1 changed files with 5 additions and 1 deletions

View File

@ -156,7 +156,11 @@ RVal ValueStateManager::GetRVal(ValueState St, const LVal& LV, QualType T) {
const lval::SymbolVal& SV = cast<lval::SymbolVal>(LV);
assert (T.getTypePtr());
if (T.getTypePtr()->isPointerType())
// Punt on "symbolic" function pointers.
if (T->isFunctionType())
return UnknownVal();
if (T->isPointerType())
return lval::SymbolVal(SymMgr.getContentsOfSymbol(SV.getSymbol()));
else
return nonlval::SymbolVal(SymMgr.getContentsOfSymbol(SV.getSymbol()));