[PATCH] D62665: Fix constexpr __builtin_*_overflow issue when unsigned->signed operand.
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 30 11:56:20 PDT 2019
erichkeane marked an inline comment as done.
erichkeane added inline comments.
Comment at: clang/lib/AST/ExprConstant.cpp:9457
+ LHS = APSInt(LHS.isSigned() ? LHS.sextOrSelf(MaxBits)
+ : LHS.zextOrSelf(MaxBits),
> Can you just write `LHS = APSInt(LHS.extOrTrunc(MaxBits), !IsSigned);`, or something like that?
I believe I can! I was unaware of this function.
CHANGES SINCE LAST ACTION
More information about the cfe-commits