Lines Matching refs:NewVar
4962 VarDecl *NewVar, VarDecl *OldVar, in BuildVariableInstantiation() argument
4972 isa<VarTemplatePartialSpecializationDecl>(NewVar); in BuildVariableInstantiation()
4976 isa<VarTemplateSpecializationDecl>(NewVar) && in BuildVariableInstantiation()
4986 NewVar->setLocalExternDecl(); in BuildVariableInstantiation()
4987 NewVar->setLexicalDeclContext(Owner); in BuildVariableInstantiation()
4989 NewVar->setLexicalDeclContext(OldVar->getLexicalDeclContext()); in BuildVariableInstantiation()
4990 NewVar->setTSCSpec(OldVar->getTSCSpec()); in BuildVariableInstantiation()
4991 NewVar->setInitStyle(OldVar->getInitStyle()); in BuildVariableInstantiation()
4992 NewVar->setCXXForRangeDecl(OldVar->isCXXForRangeDecl()); in BuildVariableInstantiation()
4993 NewVar->setObjCForDecl(OldVar->isObjCForDecl()); in BuildVariableInstantiation()
4994 NewVar->setConstexpr(OldVar->isConstexpr()); in BuildVariableInstantiation()
4995 MaybeAddCUDAConstantAttr(NewVar); in BuildVariableInstantiation()
4996 NewVar->setInitCapture(OldVar->isInitCapture()); in BuildVariableInstantiation()
4997 NewVar->setPreviousDeclInSameBlockScope( in BuildVariableInstantiation()
4999 NewVar->setAccess(OldVar->getAccess()); in BuildVariableInstantiation()
5003 NewVar->setIsUsed(); in BuildVariableInstantiation()
5004 NewVar->setReferenced(OldVar->isReferenced()); in BuildVariableInstantiation()
5007 InstantiateAttrs(TemplateArgs, OldVar, NewVar, LateAttrs, StartingScope); in BuildVariableInstantiation()
5010 *this, NewVar->getDeclName(), NewVar->getLocation(), in BuildVariableInstantiation()
5011 NewVar->isLocalExternDecl() ? Sema::LookupRedeclarationWithLinkage in BuildVariableInstantiation()
5013 NewVar->isLocalExternDecl() ? Sema::ForExternalRedeclaration in BuildVariableInstantiation()
5016 if (NewVar->isLocalExternDecl() && OldVar->getPreviousDecl() && in BuildVariableInstantiation()
5022 NewVar->getLocation(), OldVar->getPreviousDecl(), TemplateArgs)) in BuildVariableInstantiation()
5024 } else if (!isa<VarTemplateSpecializationDecl>(NewVar) && in BuildVariableInstantiation()
5026 LookupQualifiedName(Previous, NewVar->getDeclContext(), false); in BuildVariableInstantiation()
5030 CheckVariableDeclaration(NewVar, Previous); in BuildVariableInstantiation()
5033 NewVar->getLexicalDeclContext()->addHiddenDecl(NewVar); in BuildVariableInstantiation()
5034 if (!NewVar->isLocalExternDecl() || !NewVar->getPreviousDecl()) in BuildVariableInstantiation()
5035 NewVar->getDeclContext()->makeDeclVisibleInContext(NewVar); in BuildVariableInstantiation()
5039 if (NewVar->getDeclContext()->isFunctionOrMethod()) in BuildVariableInstantiation()
5040 CurrentInstantiationScope->InstantiatedLocal(OldVar, NewVar); in BuildVariableInstantiation()
5049 if (NewVar->isStaticDataMember() && !InstantiatingVarTemplate && in BuildVariableInstantiation()
5051 NewVar->setInstantiationOfStaticDataMember(OldVar, in BuildVariableInstantiation()
5060 cast<VarTemplateSpecializationDecl>(NewVar)->setSpecializationKind( in BuildVariableInstantiation()
5065 Context.setManglingNumber(NewVar, Context.getManglingNumber(OldVar)); in BuildVariableInstantiation()
5066 Context.setStaticLocalNumber(NewVar, Context.getStaticLocalNumber(OldVar)); in BuildVariableInstantiation()
5071 } else if (NewVar->getType()->isUndeducedType()) { in BuildVariableInstantiation()
5073 InstantiateVariableInitializer(NewVar, OldVar, TemplateArgs); in BuildVariableInstantiation()
5076 !NewVar->isThisDeclarationADefinition())) { in BuildVariableInstantiation()
5081 InstantiateVariableInitializer(NewVar, OldVar, TemplateArgs); in BuildVariableInstantiation()
5086 if (!NewVar->isInvalidDecl() && in BuildVariableInstantiation()
5087 NewVar->getDeclContext()->isFunctionOrMethod() && in BuildVariableInstantiation()
5089 DiagnoseUnusedDecl(NewVar); in BuildVariableInstantiation()