to reason about.
As part of taint propagation, we now allow creation of non-integer
symbolic expressions like a cast from int to float.
Addresses PR12511 (radar://
11215362).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156578
91177308-0d34-0410-b5e6-
96231b3b80d8
SymbolRef Sym, bool Assumption) {
BasicValueFactory &BVF = getBasicVals();
QualType T = Sym->getType(BVF.getContext());
+
+ // None of the constraint solvers currently support non-integer types.
+ if (!T->isIntegerType())
+ return State;
+
const llvm::APSInt &zero = BVF.getValue(0, T);
if (Assumption)
return assumeSymNE(State, Sym, zero, zero);
foo = ((long)(p));
(void) foo;
}
+
+// PR12511 and radar://11215362 - Test that we support SymCastExpr, which represents symbolic int to float cast.
+char ttt(int intSeconds) {
+ double seconds = intSeconds;
+ if (seconds)
+ return 0;
+ return 0;
+}