[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)
John McCall via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 13 15:51:44 PST 2024
================
@@ -324,6 +326,19 @@ class ScalarExprEmitter
void EmitIntegerSignChangeCheck(Value *Src, QualType SrcType, Value *Dst,
QualType DstType, SourceLocation Loc);
+ /// Emit a check that an [implicit] truncation of a bitfield does not
+ /// discard any bits. It is not UB, so we use the value after truncation.
----------------
rjmccall wrote:
The last sentence of the comment seems out of place here (and on the next function).
https://github.com/llvm/llvm-project/pull/75481
More information about the llvm-commits
mailing list