[clang] [clang] fix crash in friend definition (PR #186398)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 15 13:52:09 PDT 2026
================
@@ -18306,6 +18306,14 @@ NamedDecl *Sema::ActOnFriendFunctionDecl(Scope *S, Declarator &D,
LookupResult Previous(*this, NameInfo, LookupOrdinaryName,
RedeclarationKind::ForExternalRedeclaration);
+ bool WasQualifiedFriendDef = D.isFunctionDefinition() && SS.isNotEmpty();
+ if (WasQualifiedFriendDef) {
----------------
mizvekov wrote:
nit: we don't need the variable anymore.
https://github.com/llvm/llvm-project/pull/186398
More information about the cfe-commits
mailing list