Lines Matching refs:NewVar

3611     VarDecl *NewVar, VarDecl *OldVar,  in BuildVariableInstantiation()  argument
3623 NewVar->setLocalExternDecl(); in BuildVariableInstantiation()
3624 NewVar->setLexicalDeclContext(Owner); 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()
3632 NewVar->setPreviousDeclInSameBlockScope( in BuildVariableInstantiation()
3634 NewVar->setAccess(OldVar->getAccess()); in BuildVariableInstantiation()
3638 NewVar->setIsUsed(); in BuildVariableInstantiation()
3639 NewVar->setReferenced(OldVar->isReferenced()); in BuildVariableInstantiation()
3642 InstantiateAttrs(TemplateArgs, OldVar, NewVar, LateAttrs, StartingScope); in BuildVariableInstantiation()
3645 *this, NewVar->getDeclName(), NewVar->getLocation(), in BuildVariableInstantiation()
3646 NewVar->isLocalExternDecl() ? Sema::LookupRedeclarationWithLinkage in BuildVariableInstantiation()
3650 if (NewVar->isLocalExternDecl() && OldVar->getPreviousDecl() && in BuildVariableInstantiation()
3656 NewVar->getLocation(), OldVar->getPreviousDecl(), TemplateArgs)) in BuildVariableInstantiation()
3658 } else if (!isa<VarTemplateSpecializationDecl>(NewVar) && in BuildVariableInstantiation()
3660 LookupQualifiedName(Previous, NewVar->getDeclContext(), false); in BuildVariableInstantiation()
3661 CheckVariableDeclaration(NewVar, Previous); in BuildVariableInstantiation()
3664 NewVar->getLexicalDeclContext()->addHiddenDecl(NewVar); in BuildVariableInstantiation()
3665 if (!NewVar->isLocalExternDecl() || !NewVar->getPreviousDecl()) in BuildVariableInstantiation()
3666 NewVar->getDeclContext()->makeDeclVisibleInContext(NewVar); in BuildVariableInstantiation()
3670 if (NewVar->getDeclContext()->isFunctionOrMethod()) in BuildVariableInstantiation()
3671 CurrentInstantiationScope->InstantiatedLocal(OldVar, NewVar); in BuildVariableInstantiation()
3676 if (NewVar->isStaticDataMember() && !InstantiatingVarTemplate) 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()
3687 if ((!isa<VarTemplateSpecializationDecl>(NewVar) && in BuildVariableInstantiation()
3689 NewVar->getType()->isUndeducedType()) in BuildVariableInstantiation()
3690 InstantiateVariableInitializer(NewVar, OldVar, TemplateArgs); in BuildVariableInstantiation()
3694 if (!NewVar->isInvalidDecl() && in BuildVariableInstantiation()
3695 NewVar->getDeclContext()->isFunctionOrMethod() && in BuildVariableInstantiation()
3697 DiagnoseUnusedDecl(NewVar); in BuildVariableInstantiation()