Fixes PR 14634 and <rdar://problem/
12903080>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172274
91177308-0d34-0410-b5e6-
96231b3b80d8
Result = evalBinOp(state, BO_EQ, cast<Loc>(V), X,
U->getType());
}
- else {
+ else if (Ex->getType()->isFloatingType()) {
+ // FIXME: handle floating point types.
+ Result = UnknownVal();
+ } else {
nonloc::ConcreteInt X(getBasicVals().getValue(0, Ex->getType()));
Result = evalBinOp(state, BO_EQ, cast<NonLoc>(V), X,
U->getType());
*p = a || b; // expected-warning {{Assigned value is garbage or undefined}}
}
+// Test handling floating point values with unary '!'.
+int PR14634(int x) {
+ double y = (double)x;
+ return !y;
+}
+