[clang] [Clang] diagnose deleted/default redeclaration of defined friend functions (PR #136717)

Oleksandr T. via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 22 09:02:34 PDT 2025


================
@@ -142,6 +142,13 @@ NamedDecl *Parser::ParseCXXInlineMethodDef(
       SkipUntil(tok::semi);
     }
 
+    Decl *PrevDecl = FnD->getPreviousDecl();
+    if (PrevDecl && isa<FunctionDecl>(PrevDecl) &&
----------------
a-tarasyuk wrote:

@zwuis thanks 

https://github.com/llvm/llvm-project/pull/136717


More information about the cfe-commits mailing list