[clang] [Clang][CodeGen] Respect -fwrapv-pointer when emitting struct GEPs (PR #134269)
Yingwei Zheng via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 8 00:04:08 PDT 2025
================
@@ -10,3 +10,24 @@ void test(void) {
// DEFAULT: getelementptr inbounds nuw i32, ptr
// FWRAPV-POINTER: getelementptr i32, ptr
}
+
+struct S {
+ int a;
+ int b;
+ int c: 10;
----------------
dtcxzyw wrote:
Bitfields are handled by a different code path: https://github.com/llvm/llvm-project/blob/2c1bdd4a0811af89eb9631935fbd90f13a04eacb/clang/lib/CodeGen/CGExpr.cpp#L4977
https://github.com/llvm/llvm-project/pull/134269
More information about the cfe-commits
mailing list