================ @@ -6027,8 +6027,12 @@ void Sema::BuildVariableInstantiation( Context.setManglingNumber(NewVar, Context.getManglingNumber(OldVar)); Context.setStaticLocalNumber(NewVar, Context.getStaticLocalNumber(OldVar)); + bool VarTemplateWithAutoType = + OldVar->getTypeSourceInfo()->getType()->getAs<AutoType>(); + // Figure out whether to eagerly instantiate the initializer. - if (InstantiatingVarTemplate || InstantiatingVarTemplatePartialSpec) { + if (!VarTemplateWithAutoType && + (InstantiatingVarTemplate || InstantiatingVarTemplatePartialSpec)) { ---------------- dty2 wrote:
Oh, I realized my mistake, thank you for correcting me. https://github.com/llvm/llvm-project/pull/138122 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits