Lines Matching refs:OldVar
3611 VarDecl *NewVar, VarDecl *OldVar, in BuildVariableInstantiation() argument
3622 if (OldVar->isLocalExternDecl()) { in BuildVariableInstantiation()
3625 } else if (OldVar->isOutOfLine()) in BuildVariableInstantiation()
3626 NewVar->setLexicalDeclContext(OldVar->getLexicalDeclContext()); in BuildVariableInstantiation()
3627 NewVar->setTSCSpec(OldVar->getTSCSpec()); in BuildVariableInstantiation()
3628 NewVar->setInitStyle(OldVar->getInitStyle()); in BuildVariableInstantiation()
3629 NewVar->setCXXForRangeDecl(OldVar->isCXXForRangeDecl()); in BuildVariableInstantiation()
3630 NewVar->setConstexpr(OldVar->isConstexpr()); in BuildVariableInstantiation()
3631 NewVar->setInitCapture(OldVar->isInitCapture()); in BuildVariableInstantiation()
3633 OldVar->isPreviousDeclInSameBlockScope()); in BuildVariableInstantiation()
3634 NewVar->setAccess(OldVar->getAccess()); in BuildVariableInstantiation()
3636 if (!OldVar->isStaticDataMember()) { in BuildVariableInstantiation()
3637 if (OldVar->isUsed(false)) in BuildVariableInstantiation()
3639 NewVar->setReferenced(OldVar->isReferenced()); in BuildVariableInstantiation()
3642 InstantiateAttrs(TemplateArgs, OldVar, NewVar, LateAttrs, StartingScope); in BuildVariableInstantiation()
3650 if (NewVar->isLocalExternDecl() && OldVar->getPreviousDecl() && in BuildVariableInstantiation()
3651 (!OldVar->getPreviousDecl()->getDeclContext()->isDependentContext() || in BuildVariableInstantiation()
3652 OldVar->getPreviousDecl()->getDeclContext()==OldVar->getDeclContext())) { in BuildVariableInstantiation()
3656 NewVar->getLocation(), OldVar->getPreviousDecl(), TemplateArgs)) in BuildVariableInstantiation()
3659 OldVar->hasLinkage()) in BuildVariableInstantiation()
3669 if (!OldVar->isOutOfLine()) { in BuildVariableInstantiation()
3671 CurrentInstantiationScope->InstantiatedLocal(OldVar, NewVar); in BuildVariableInstantiation()
3677 NewVar->setInstantiationOfStaticDataMember(OldVar, in BuildVariableInstantiation()
3681 Context.setManglingNumber(NewVar, Context.getManglingNumber(OldVar)); in BuildVariableInstantiation()
3682 Context.setStaticLocalNumber(NewVar, Context.getStaticLocalNumber(OldVar)); in BuildVariableInstantiation()
3690 InstantiateVariableInitializer(NewVar, OldVar, TemplateArgs); in BuildVariableInstantiation()
3696 OldVar->getType()->isDependentType()) in BuildVariableInstantiation()
3702 VarDecl *Var, VarDecl *OldVar, in InstantiateVariableInitializer() argument
3709 if (OldVar->getInit()) { in InstantiateVariableInitializer()
3710 if (Var->isStaticDataMember() && !OldVar->isOutOfLine()) in InstantiateVariableInitializer()
3711 PushExpressionEvaluationContext(Sema::ConstantEvaluated, OldVar); in InstantiateVariableInitializer()
3713 PushExpressionEvaluationContext(Sema::PotentiallyEvaluated, OldVar); in InstantiateVariableInitializer()
3717 SubstInitializer(OldVar->getInit(), TemplateArgs, in InstantiateVariableInitializer()
3718 OldVar->getInitStyle() == VarDecl::CallInit); in InstantiateVariableInitializer()
3728 bool DirectInit = OldVar->isDirectInit(); in InstantiateVariableInitializer()
3960 VarDecl *OldVar = Var; in InstantiateVariableDefinition() local
3986 R.addDecl(OldVar); in InstantiateVariableDefinition()
4001 Var->setTemplateSpecializationKind(OldVar->getTemplateSpecializationKind(), in InstantiateVariableDefinition()
4002 OldVar->getPointOfInstantiation()); in InstantiateVariableDefinition()