[clang-tools-extra] [clang-tidy] Fix false positive in readability-make-member-function-c… (PR #174286)
Arthur Courteaud via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 18 09:36:43 PST 2026
================
@@ -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
More information about the cfe-commits
mailing list