[PATCH] D53308: [Fixed Point Arithmetic] Fixed Point to Boolean Cast
Bevin Hansson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 16 01:07:06 PDT 2018
ebevhan added inline comments.
================
Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1032
+ // them.
+ return Builder.CreateIsNotNull(Src);
+ }
----------------
Is this comment true? I don't think EmitFixedPointConversion does this.
Maybe I'm misinterpreting what it means.
================
Comment at: clang/lib/CodeGen/CGExprScalar.cpp:2023
+ // We do not check the padding bit on unsigned types since they are zero'd
+ // out on operations that can cause overflow into the bit.
+ assert(E->getType()->isFixedPointType() &&
----------------
This comment is a duplicate of the one in EmitScalarConversion.
================
Comment at: clang/lib/Sema/Sema.cpp:537
case Type::STK_FixedPoint:
- llvm_unreachable("Unknown cast from FixedPoint to boolean");
+ return CK_FixedPointToBoolean;
}
----------------
Put this on the line above directly after the case like the others.
Repository:
rC Clang
https://reviews.llvm.org/D53308
More information about the cfe-commits
mailing list