[clang] [clang][Sema] Fix false-positive -Wshadow for friend functions (PR #221249)
Bruno De Fraine via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 15 01:36:15 PDT 2026
================
@@ -492,6 +492,8 @@ features cannot lower the translation-unit ABI level;
`operator delete`, since such a delete expression never invokes the
destructor. (#GH65524)
+- Fixed a false-positive `-Wshadow` warning when a function parameter in an inline-defined friend function shares the name of a non-static class member variable. (#GH221190)
----------------
brunodf-gf wrote:
I would write more generally "when a variable in..." instead of "when a function parameter in...".
Also, you should probably insert newlines and spaces to hard-wrap and indent the text.
https://github.com/llvm/llvm-project/pull/221249
More information about the cfe-commits
mailing list