[clang] [Serialization] Fix lazy template loading (PR #133057)

Jonas Hahnfeld via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 25 05:15:26 PDT 2025


================
@@ -367,12 +367,6 @@ bool RedeclarableTemplateDecl::loadLazySpecializationsImpl(
   if (!ExternalSource)
     return false;
 
-  // If TPL is not null, it implies that we're loading specializations for
-  // partial templates. We need to load all specializations in such cases.
-  if (TPL)
----------------
hahnjo wrote:

Yes, we could remove it from `loadLazySpecializationsImpl`, but we need it in `Profile` since df061c3e2b97974f9e2d72a023eb1c5b987010bc. This complicates the removal considerably, which IMHO makes the code more complicated: https://github.com/hahnjo/llvm-project/commit/bb4788afc66690975e67c7cf1461033e79feb13f

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


More information about the cfe-commits mailing list