[clang] [clang][Sema] Fix false-positive -Wshadow for friend functions (PR #221249)
ahmed mohamed kamel via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 15 04:54:58 PDT 2026
================
@@ -90,6 +90,22 @@ class A {
}
};
+class FriendFunction {
+ int x; // expected-note {{previous declaration is here}}
+ friend bool operator==(const FriendFunction &f, int x) {
+ return f.x == x;
+ }
----------------
AhmedKamel10 wrote:
Added the test case.
https://github.com/llvm/llvm-project/pull/221249
More information about the cfe-commits
mailing list