forked from OSchip/llvm-project
[analyzer] Taint: when looking up a binding, provide the type.
llvm-svn: 148080
This commit is contained in:
parent
6228130099
commit
a31f6b9559
|
@ -243,7 +243,10 @@ SymbolRef GenericTaintChecker::getPointedToSymbol(CheckerContext &C,
|
|||
return 0;
|
||||
}
|
||||
|
||||
SVal Val = State->getSVal(*AddrLoc);
|
||||
const PointerType *ArgTy =
|
||||
dyn_cast<PointerType>(Arg->getType().getCanonicalType().getTypePtr());
|
||||
assert(ArgTy);
|
||||
SVal Val = State->getSVal(*AddrLoc, ArgTy->getPointeeType());
|
||||
return Val.getAsSymbol();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue