[clang] [Clang] Eagerly instantiate used constexpr function upon definition. (PR #73463)

via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 28 03:17:46 PST 2023


cor3ntin wrote:

> I _think_ the new map should be unnecessary: `FunctionTemplateDecl` and `VarTemplateDecl` already have a list of specializations that you can walk and check the point of instantiation and template specialization kind to see if there's a pending instantiation.

I don't think that's viable for non-template but templated entities like member function in a class template. Am I missing something?

> If you want/need to keep the map approach, you'll need to also deal with the case where the template is declared in a PCH and then defined somewhere that includes the PCH, which will mean serializing and deserializing the map contents.

I did not consider that :(

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


More information about the cfe-commits mailing list