Lines Matching refs:NewVar
3785 VarDecl *NewVar, VarDecl *OldVar,
3797 NewVar->setLocalExternDecl();
3798 NewVar->setLexicalDeclContext(Owner);
3800 NewVar->setLexicalDeclContext(OldVar->getLexicalDeclContext());
3801 NewVar->setTSCSpec(OldVar->getTSCSpec());
3802 NewVar->setInitStyle(OldVar->getInitStyle());
3803 NewVar->setCXXForRangeDecl(OldVar->isCXXForRangeDecl());
3804 NewVar->setConstexpr(OldVar->isConstexpr());
3805 NewVar->setInitCapture(OldVar->isInitCapture());
3806 NewVar->setPreviousDeclInSameBlockScope(
3808 NewVar->setAccess(OldVar->getAccess());
3812 NewVar->setIsUsed();
3813 NewVar->setReferenced(OldVar->isReferenced());
3816 InstantiateAttrs(TemplateArgs, OldVar, NewVar, LateAttrs, StartingScope);
3819 *this, NewVar->getDeclName(), NewVar->getLocation(),
3820 NewVar->isLocalExternDecl() ? Sema::LookupRedeclarationWithLinkage
3824 if (NewVar->isLocalExternDecl() && OldVar->getPreviousDecl() &&
3830 NewVar->getLocation(), OldVar->getPreviousDecl(), TemplateArgs))
3832 } else if (!isa<VarTemplateSpecializationDecl>(NewVar) &&
3834 LookupQualifiedName(Previous, NewVar->getDeclContext(), false);
3835 CheckVariableDeclaration(NewVar, Previous);
3838 NewVar->getLexicalDeclContext()->addHiddenDecl(NewVar);
3839 if (!NewVar->isLocalExternDecl() || !NewVar->getPreviousDecl())
3840 NewVar->getDeclContext()->makeDeclVisibleInContext(NewVar);
3844 if (NewVar->getDeclContext()->isFunctionOrMethod())
3845 CurrentInstantiationScope->InstantiatedLocal(OldVar, NewVar);
3850 if (NewVar->isStaticDataMember() && !InstantiatingVarTemplate)
3851 NewVar->setInstantiationOfStaticDataMember(OldVar,
3855 Context.setManglingNumber(NewVar, Context.getManglingNumber(OldVar));
3856 Context.setStaticLocalNumber(NewVar, Context.getStaticLocalNumber(OldVar));
3861 if ((!isa<VarTemplateSpecializationDecl>(NewVar) &&
3864 NewVar->getType()->isUndeducedType())
3865 InstantiateVariableInitializer(NewVar, OldVar, TemplateArgs);
3869 if (!NewVar->isInvalidDecl() &&
3870 NewVar->getDeclContext()->isFunctionOrMethod() &&
3872 DiagnoseUnusedDecl(NewVar);