[PATCH] D154951: [clang][Interp] __builtin_bit_cast, Take 2
Mital Ashok via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 25 10:03:22 PDT 2023
MitalAshok added inline comments.
================
Comment at: clang/lib/AST/Interp/Boolean.h:113
+ static Boolean bitcastFromMemory(const std::byte *Buff) {
+ bool Val = static_cast<bool>(*Buff);
+ return Boolean(Val);
----------------
Does this handle padding bits correctly? E.g., `__builtin_bit_cast(bool, (unsigned char) 0b10u)` should be false
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154951/new/
https://reviews.llvm.org/D154951
More information about the cfe-commits
mailing list