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

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 1 08:12:12 PDT 2024


================
@@ -4437,6 +4441,31 @@ ExpectedDecl ASTNodeImporter::VisitFriendDecl(FriendDecl *D) {
   return FrD;
 }
 
+ExpectedDecl ASTNodeImporter::VisitFriendPackDecl(FriendPackDecl *D) {
+  // Import the major distinguishing characteristics of a declaration.
+  DeclContext *DC, *LexicalDC;
+  if (Error Err = ImportDeclContext(D, DC, LexicalDC))
+    return std::move(Err);
+
+  auto ToInstantiatedFromFriendOrErr =
+      Importer.Import(D->getInstantiatedFromFriendDecl());
----------------
zyn0217 wrote:

nit: It would be great to spell out the type name if it is not too long - I'm also unfamiliar with the ASTImporter, though :)

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


More information about the cfe-commits mailing list