[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 13 04:15:24 PDT 2024


================
@@ -17354,12 +17354,18 @@ Decl *Sema::BuildStaticAssertDeclaration(SourceLocation StaticAssertLoc,
 DeclResult Sema::ActOnTemplatedFriendTag(
     Scope *S, SourceLocation FriendLoc, unsigned TagSpec, SourceLocation TagLoc,
     CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc,
-    const ParsedAttributesView &Attr, MultiTemplateParamsArg TempParamLists) {
+    SourceLocation EllipsisLoc, const ParsedAttributesView &Attr,
+    MultiTemplateParamsArg TempParamLists) {
   TagTypeKind Kind = TypeWithKeyword::getTagTypeKindForTypeSpec(TagSpec);
 
   bool IsMemberSpecialization = false;
   bool Invalid = false;
 
+  // FIXME: This works for now; revisit once we support packs in NNSs.
+  if (EllipsisLoc.isValid())
+    Diag(EllipsisLoc, diag::err_pack_expansion_without_parameter_packs)
+        << SourceRange(FriendLoc, NameLoc);
+
----------------
Sirraide wrote:

Ok, should be done now. That also gets rid of the FIXME and the janky diagnostic here.

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


More information about the cfe-commits mailing list