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

Vassil Vassilev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 12 00:12:29 PDT 2023


v.g.vassilev 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
----------------
shafik wrote:
> `/*=false*/` is this left over code that was meant to be removed?
That was not my intent. I added `/*=false*/` to keep track of the the actual default argument.

However, you are right, we are not using it without passing the correct argument. I will drop the default arg.


================
Comment at: clang/lib/AST/DeclTemplate.cpp:366
+                                                      Args,
+                                                      TemplateParameterList *TPL) const {
+  CommonBase *CommonBasePtr = getMostRecentDecl()->getCommonPtr();
----------------
Hahnfeld wrote:
> ChuanqiXu wrote:
> > TPL here looks not used.
> This is required because of the argument forwarding from `findSpecializationImpl` below...
Are you suggesting to make this replacement: `TPL` -> `/*TPL*/`?


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

https://reviews.llvm.org/D41416



More information about the cfe-commits mailing list