================
@@ -6027,8 +6027,15 @@ void Sema::BuildVariableInstantiation(
Context.setManglingNumber(NewVar, Context.getManglingNumber(OldVar));
Context.setStaticLocalNumber(NewVar, Context.getStaticLocalNumber(OldVar));
+ bool VarTemplateWithAutoType = false;
+ QualType VarSourceType = OldVar->getTypeSourceInfo()->getType();
+ if (VarSourceType->getAs<AutoType>()) {
+ VarTemplateWithAutoType = true;
+ }
+
----------------
zyn0217 wrote:
```suggestion
bool VarTemplateWithAutoType =
OldVar->getTypeSourceInfo()->getType()->getAs<AutoType>();
```
Can we avoid getTypeSourceInfo?
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