зеркало из https://github.com/microsoft/clang-1.git
Return "Unknown" when using the value of a function pointer whose value
is symbolic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47463 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
10c16657ee
Коммит
9c37417979
|
@ -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()));
|
||||
|
|
Загрузка…
Ссылка в новой задаче