diff options
author | Sirraide <aeternalmail@gmail.com> | 2024-08-15 21:16:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-15 21:16:30 +0200 |
commit | 2b0a8fcf702fb63fca8ec6e11dca35baf70f058d (patch) | |
tree | 7538d984dd146642ed6eb36472354a4a2fcfd68b /clang/lib/Sema/SemaDecl.cpp | |
parent | b5e63cc533b5e752eb475ac657f09b9bb5eb2373 (diff) | |
download | llvm-2b0a8fcf702fb63fca8ec6e11dca35baf70f058d.zip llvm-2b0a8fcf702fb63fca8ec6e11dca35baf70f058d.tar.gz llvm-2b0a8fcf702fb63fca8ec6e11dca35baf70f058d.tar.bz2 |
[Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (#101448)
Implement P2893R3 ‘Variadic friends’ for C++26.
This closes #98587.
Co-authored-by: Younan Zhang <zyn7109@gmail.com>
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 641b180..83a6526 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -5000,7 +5000,8 @@ Decl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS, const ParsedAttributesView &DeclAttrs, MultiTemplateParamsArg TemplateParams, bool IsExplicitInstantiation, - RecordDecl *&AnonRecord) { + RecordDecl *&AnonRecord, + SourceLocation EllipsisLoc) { Decl *TagD = nullptr; TagDecl *Tag = nullptr; if (DS.getTypeSpecType() == DeclSpec::TST_class || @@ -5067,9 +5068,12 @@ Decl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS, // whatever routines created it handled the friendship aspect. if (TagD && !Tag) return nullptr; - return ActOnFriendTypeDecl(S, DS, TemplateParams); + return ActOnFriendTypeDecl(S, DS, TemplateParams, EllipsisLoc); } + assert(EllipsisLoc.isInvalid() && + "Friend ellipsis but not friend-specified?"); + // Track whether this decl-specifier declares anything. bool DeclaresAnything = true; |