Fix transfer function logic in GRSimpleVals for integer casts: only support casts from integers to integers.
This fixes a crash reported by Anders Carlsson! llvm-svn: 53649
This commit is contained in:
parent
3be3401303
commit
f46dddac5b
|
@ -377,6 +377,10 @@ RVal GRSimpleVals::EvalCast(GRExprEngine& Eng, NonLVal X, QualType T) {
|
|||
if (!isa<nonlval::ConcreteInt>(X))
|
||||
return UnknownVal();
|
||||
|
||||
// Only handle casts from integers to integers.
|
||||
if (!T->isIntegerType())
|
||||
return UnknownVal();
|
||||
|
||||
BasicValueFactory& BasicVals = Eng.getBasicVals();
|
||||
|
||||
llvm::APSInt V = cast<nonlval::ConcreteInt>(X).getValue();
|
||||
|
|
Loading…
Reference in New Issue