Lines Matching refs:OldVar
3785 VarDecl *NewVar, VarDecl *OldVar, in BuildVariableInstantiation() argument
3796 if (OldVar->isLocalExternDecl()) { in BuildVariableInstantiation()
3799 } else if (OldVar->isOutOfLine()) in BuildVariableInstantiation()
3800 NewVar->setLexicalDeclContext(OldVar->getLexicalDeclContext()); in BuildVariableInstantiation()
3801 NewVar->setTSCSpec(OldVar->getTSCSpec()); in BuildVariableInstantiation()
3802 NewVar->setInitStyle(OldVar->getInitStyle()); in BuildVariableInstantiation()
3803 NewVar->setCXXForRangeDecl(OldVar->isCXXForRangeDecl()); in BuildVariableInstantiation()
3804 NewVar->setConstexpr(OldVar->isConstexpr()); in BuildVariableInstantiation()
3805 NewVar->setInitCapture(OldVar->isInitCapture()); in BuildVariableInstantiation()
3807 OldVar->isPreviousDeclInSameBlockScope()); in BuildVariableInstantiation()
3808 NewVar->setAccess(OldVar->getAccess()); in BuildVariableInstantiation()
3810 if (!OldVar->isStaticDataMember()) { in BuildVariableInstantiation()
3811 if (OldVar->isUsed(false)) in BuildVariableInstantiation()
3813 NewVar->setReferenced(OldVar->isReferenced()); in BuildVariableInstantiation()
3816 InstantiateAttrs(TemplateArgs, OldVar, NewVar, LateAttrs, StartingScope); in BuildVariableInstantiation()
3824 if (NewVar->isLocalExternDecl() && OldVar->getPreviousDecl() && in BuildVariableInstantiation()
3825 (!OldVar->getPreviousDecl()->getDeclContext()->isDependentContext() || in BuildVariableInstantiation()
3826 OldVar->getPreviousDecl()->getDeclContext()==OldVar->getDeclContext())) { in BuildVariableInstantiation()
3830 NewVar->getLocation(), OldVar->getPreviousDecl(), TemplateArgs)) in BuildVariableInstantiation()
3833 OldVar->hasLinkage()) in BuildVariableInstantiation()
3843 if (!OldVar->isOutOfLine()) { in BuildVariableInstantiation()
3845 CurrentInstantiationScope->InstantiatedLocal(OldVar, NewVar); in BuildVariableInstantiation()
3851 NewVar->setInstantiationOfStaticDataMember(OldVar, in BuildVariableInstantiation()
3855 Context.setManglingNumber(NewVar, Context.getManglingNumber(OldVar)); in BuildVariableInstantiation()
3856 Context.setStaticLocalNumber(NewVar, Context.getStaticLocalNumber(OldVar)); in BuildVariableInstantiation()
3863 !(OldVar->isInline() && OldVar->isThisDeclarationADefinition())) || in BuildVariableInstantiation()
3865 InstantiateVariableInitializer(NewVar, OldVar, TemplateArgs); in BuildVariableInstantiation()
3871 OldVar->getType()->isDependentType()) in BuildVariableInstantiation()
3877 VarDecl *Var, VarDecl *OldVar, in InstantiateVariableInitializer() argument
3882 if (OldVar->isInlineSpecified()) in InstantiateVariableInitializer()
3884 else if (OldVar->isInline()) in InstantiateVariableInitializer()
3891 if (OldVar->getInit()) { in InstantiateVariableInitializer()
3892 if (Var->isStaticDataMember() && !OldVar->isOutOfLine()) in InstantiateVariableInitializer()
3893 PushExpressionEvaluationContext(Sema::ConstantEvaluated, OldVar); in InstantiateVariableInitializer()
3895 PushExpressionEvaluationContext(Sema::PotentiallyEvaluated, OldVar); in InstantiateVariableInitializer()
3902 Init = SubstInitializer(OldVar->getInit(), TemplateArgs, in InstantiateVariableInitializer()
3903 OldVar->getInitStyle() == VarDecl::CallInit); in InstantiateVariableInitializer()
3915 bool DirectInit = OldVar->isDirectInit(); in InstantiateVariableInitializer()
4165 VarDecl *OldVar = Var; in InstantiateVariableDefinition() local
4196 R.addDecl(OldVar); in InstantiateVariableDefinition()
4211 Var->setTemplateSpecializationKind(OldVar->getTemplateSpecializationKind(), in InstantiateVariableDefinition()
4212 OldVar->getPointOfInstantiation()); in InstantiateVariableDefinition()