[clang] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

Krystian Stasiowski via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 21 06:37:45 PDT 2023


================
@@ -1016,21 +1003,20 @@ void ASTDeclReader::VisitFunctionDecl(FunctionDecl *FD) {
   }
   case FunctionDecl::TK_DependentFunctionTemplateSpecialization: {
     // Templates.
-    UnresolvedSet<8> TemplDecls;
-    unsigned NumTemplates = Record.readInt();
-    while (NumTemplates--)
-      TemplDecls.addDecl(readDeclAs<NamedDecl>());
+    UnresolvedSet<8> Candidates;
+    unsigned NumCandidates = Record.readInt();
----------------
sdkrystian wrote:

@shafik  The "convention" here seems to be to use the type of the member being deserialized (see lines 1082 & 1122). The `UnresolvedSet` is only used to pass the candidates to `DependentFunctionTemplateSpecializationInfo::Create`; the actual candidates are stored as trailing objects & the number of candidates is stored in `DependentFunctionTemplateSpecializationInfo::NumCandidates` (which has the type `unsigned`).

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


More information about the cfe-commits mailing list