================
@@ -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
----------------
arthur3336 wrote:
Will do
https://github.com/llvm/llvm-project/pull/174286
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits