[PATCH] D77048: [Clang][CodeGen] Fixing mismatch between memory layout and const expressions for oversized bitfields

Lucas Prates via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 1 04:24:50 PDT 2020


pratlucas marked 2 inline comments as done.
pratlucas added inline comments.


================
Comment at: clang/lib/CodeGen/CGExprConstant.cpp:613
+  
+  // Add padding bits in case of over-sized bit-field.
+  //   "The first sizeof(T)*8 bits are used to hold the value of the bit-field,
----------------
efriedma wrote:
> The existing code in ConstantAggregateBuilder::add should skip over padding.  I'm not sure what you're trying to accomplish by adding more code dealing with padding here.
You're right, I missed the fact that `FieldOffset`s take care of this.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77048/new/

https://reviews.llvm.org/D77048





More information about the cfe-commits mailing list