================
@@ -336,3 +336,53 @@ struct MemberFunctionPointer {
 };
 
 } // namespace Keep
+
+namespace UnionMemberAccess {
+  // Test case from GitHub issue #174269
+  // Union with pointer member returning non-const reference
+  struct UnionWithPointer {
+    union { int* resource; };
+    int& get() { return *resource; }  // Should NOT trigger warning
----------------
vbvictor wrote:

Please remove all 
`// Should NOT trigger warning`

It is expected by default to not trigger warning

https://github.com/llvm/llvm-project/pull/174286
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to