[PATCH] D125986: [clang][ASTImporter] Add support for import of UsingPackDecl.

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 20 08:54:46 PDT 2022


balazske added a reviewer: martong.
balazske added inline comments.
Herald added a subscriber: rnkovacs.


================
Comment at: clang/lib/AST/ASTImporter.cpp:4861
+  ToUsingPack->setLexicalDeclContext(LexicalDC);
+  LexicalDC->addDeclInternal(ToUsingPack);
+
----------------
martong wrote:
> Why don't we use `addDeclToContexts`?
I do not know, it is not used in the other import functions of `using` related declarations. Probably only lexical DC is applicable for these, or the code is older than `addDeclToContexts` and was not updated. But then the other import functions should be changed too.


================
Comment at: clang/unittests/AST/ASTImporterTest.cpp:925
+          classTemplateSpecializationDecl(hasDescendant(usingPackDecl())))))));
+}
+
----------------
martong wrote:
> Should we also check if the DeclContext and the Extensions are properly set?
I will add a more detailed test.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125986/new/

https://reviews.llvm.org/D125986



More information about the cfe-commits mailing list