[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 11 08:34:36 PDT 2023


shafik added inline comments.


================
Comment at: clang/lib/AST/DeclTemplate.cpp:337
+void RedeclarableTemplateDecl::loadLazySpecializationsImpl(
+                                             bool OnlyPartial/*=false*/) const {
   // Grab the most recent declaration to ensure we've loaded any lazy
----------------
`/*=false*/` is this left over code that was meant to be removed?


================
Comment at: clang/lib/AST/DeclTemplate.cpp:561
 ClassTemplateDecl::getPartialSpecializations() const {
-  LoadLazySpecializations();
+  LoadLazySpecializations(/*PartialOnly = */ true);
   return getCommonPtr()->PartialSpecializations;
----------------
nit


================
Comment at: clang/lib/AST/DeclTemplate.cpp:1294
+void VarTemplateDecl::LoadLazySpecializations(
+                                             bool OnlyPartial/*=false*/) const {
+  loadLazySpecializationsImpl(OnlyPartial);
----------------
Was `/*=false*/` meant to be removed?


================
Comment at: clang/lib/AST/DeclTemplate.cpp:1306
 VarTemplateDecl::getPartialSpecializations() const {
-  LoadLazySpecializations();
+  LoadLazySpecializations(/*PartialOnly = */ true);
   return getCommonPtr()->PartialSpecializations;
----------------



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

https://reviews.llvm.org/D41416



More information about the cfe-commits mailing list