[clang] [clang][bytecode] Fix pointer comparison to first record member (PR #172168)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 17 03:13:40 PST 2025


================
@@ -1225,3 +1225,25 @@ namespace ConditionalTemporaries {
   static_assert(foo(false)== 13);
   static_assert(foo(true)== 12);
 }
+
+namespace FirstRecordMemberCmp {
+
+  struct tuple {
+    int a;
+    int b;
+  };
+
+  constexpr tuple tpl{1,2};
+  static_assert((void*)&tpl == (void*)&tpl.a);
----------------
tbaederr wrote:

This PR doesn't fix the `a + 1` issue. This PR is really superseded by https://github.com/llvm/llvm-project/pull/172322

https://github.com/llvm/llvm-project/pull/172168


More information about the cfe-commits mailing list