Lines Matching refs:New
94 const AlignedAttr *Aligned, Decl *New, bool IsPackExpansion) { in instantiateDependentAlignedAttr() argument
101 S.AddAlignedAttr(New, *Aligned, Result.getAs<Expr>(), IsPackExpansion); in instantiateDependentAlignedAttr()
109 S.AddAlignedAttr(New, *Aligned, Result, IsPackExpansion); in instantiateDependentAlignedAttr()
116 const AlignedAttr *Aligned, Decl *New) { in instantiateDependentAlignedAttr() argument
118 instantiateDependentAlignedAttr(S, TemplateArgs, Aligned, New, false); in instantiateDependentAlignedAttr()
143 instantiateDependentAlignedAttr(S, TemplateArgs, Aligned, New, true); in instantiateDependentAlignedAttr()
147 instantiateDependentAlignedAttr(S, TemplateArgs, Aligned, New, false); in instantiateDependentAlignedAttr()
154 const AssumeAlignedAttr *Aligned, Decl *New) { in instantiateDependentAssumeAlignedAttr() argument
172 S.AddAssumeAlignedAttr(New, *Aligned, E, OE); in instantiateDependentAssumeAlignedAttr()
177 const AlignValueAttr *Aligned, Decl *New) { in instantiateDependentAlignValueAttr() argument
183 S.AddAlignValueAttr(New, *Aligned, Result.getAs<Expr>()); in instantiateDependentAlignValueAttr()
188 const AllocAlignAttr *Align, Decl *New) { in instantiateDependentAllocAlignAttr() argument
193 S.AddAllocAlignAttr(New, *Align, Param); in instantiateDependentAllocAlignAttr()
198 const AnnotateAttr *Attr, Decl *New) { in instantiateDependentAnnotationAttr() argument
231 S.AddAnnotationAttr(New, *Attr, Str, Args); in instantiateDependentAnnotationAttr()
236 const Attr *A, Expr *OldCond, const Decl *Tmpl, FunctionDecl *New) { in instantiateDependentFunctionAttrCondition() argument
239 Sema::ContextRAII SwitchContext(S, New); in instantiateDependentFunctionAttrCondition()
256 !Expr::isPotentialConstantExprUnevaluated(Cond, New, Diags)) { in instantiateDependentFunctionAttrCondition()
267 const EnableIfAttr *EIA, const Decl *Tmpl, FunctionDecl *New) { in instantiateDependentEnableIfAttr() argument
269 S, TemplateArgs, EIA, EIA->getCond(), Tmpl, New); in instantiateDependentEnableIfAttr()
272 New->addAttr(new (S.getASTContext()) EnableIfAttr(S.getASTContext(), *EIA, in instantiateDependentEnableIfAttr()
278 const DiagnoseIfAttr *DIA, const Decl *Tmpl, FunctionDecl *New) { in instantiateDependentDiagnoseIfAttr() argument
280 S, TemplateArgs, DIA, DIA->getCond(), Tmpl, New); in instantiateDependentDiagnoseIfAttr()
283 New->addAttr(new (S.getASTContext()) DiagnoseIfAttr( in instantiateDependentDiagnoseIfAttr()
285 DIA->getDiagnosticType(), DIA->getArgDependent(), New)); in instantiateDependentDiagnoseIfAttr()
292 const CUDALaunchBoundsAttr &Attr, Decl *New) { in instantiateDependentCUDALaunchBoundsAttr() argument
318 S.AddLaunchBoundsAttr(New, Attr, MaxThreads, MinBlocks, MaxBlocks); in instantiateDependentCUDALaunchBoundsAttr()
324 const ModeAttr &Attr, Decl *New) { in instantiateDependentModeAttr() argument
325 S.AddModeAttr(New, Attr, Attr.getMode(), in instantiateDependentModeAttr()
332 const OMPDeclareSimdDeclAttr &Attr, Decl *New) { in instantiateOMPDeclareSimdDeclAttr() argument
334 if (auto *FTD = dyn_cast<FunctionTemplateDecl>(New)) in instantiateOMPDeclareSimdDeclAttr()
335 New = FTD->getTemplatedDecl(); in instantiateOMPDeclareSimdDeclAttr()
336 auto *FD = cast<FunctionDecl>(New); in instantiateOMPDeclareSimdDeclAttr()
407 S.ConvertDeclToDeclGroup(New), Attr.getBranchState(), Simdlen.get(), in instantiateOMPDeclareSimdDeclAttr()
415 const OMPDeclareVariantAttr &Attr, Decl *New) { in instantiateOMPDeclareVariantAttr() argument
417 if (auto *FTD = dyn_cast<FunctionTemplateDecl>(New)) in instantiateOMPDeclareVariantAttr()
418 New = FTD->getTemplatedDecl(); in instantiateOMPDeclareVariantAttr()
419 auto *FD = cast<FunctionDecl>(New); in instantiateOMPDeclareVariantAttr()
484 S.ConvertDeclToDeclGroup(New), E, TI, Attr.appendArgs_size(), in instantiateOMPDeclareVariantAttr()
503 New->getLocation()); in instantiateOMPDeclareVariantAttr()
513 New->getLocation(), SubstFD, /* Recursive */ true, in instantiateOMPDeclareVariantAttr()
553 const AMDGPUFlatWorkGroupSizeAttr &Attr, Decl *New) { in instantiateDependentAMDGPUFlatWorkGroupSizeAttr() argument
568 S.AMDGPU().addAMDGPUFlatWorkGroupSizeAttr(New, Attr, MinExpr, MaxExpr); in instantiateDependentAMDGPUFlatWorkGroupSizeAttr()
594 const AMDGPUWavesPerEUAttr &Attr, Decl *New) { in instantiateDependentAMDGPUWavesPerEUAttr() argument
612 S.AMDGPU().addAMDGPUWavesPerEUAttr(New, Attr, MinExpr, MaxExpr); in instantiateDependentAMDGPUWavesPerEUAttr()
617 const AMDGPUMaxNumWorkGroupsAttr &Attr, Decl *New) { in instantiateDependentAMDGPUMaxNumWorkGroupsAttr() argument
635 S.AMDGPU().addAMDGPUMaxNumWorkGroupsAttr(New, Attr, XExpr, YExpr, ZExpr); in instantiateDependentAMDGPUMaxNumWorkGroupsAttr()
643 const SYCLKernelAttr &Attr, Decl *New) { in instantiateDependentSYCLKernelAttr() argument
644 New->addAttr(Attr.clone(S.getASTContext())); in instantiateDependentSYCLKernelAttr()
696 const HLSLParamModifierAttr *Attr, Decl *New) { in instantiateDependentHLSLParamModifierAttr() argument
697 ParmVarDecl *P = cast<ParmVarDecl>(New); in instantiateDependentHLSLParamModifierAttr()
704 Decl *New, LateInstantiatedAttrVec *LateAttrs, in InstantiateAttrsForDecl() argument
706 if (NamedDecl *ND = dyn_cast<NamedDecl>(New)) { in InstantiateAttrsForDecl()
711 if (!isRelevantAttr(*this, New, TmplAttr)) in InstantiateAttrsForDecl()
722 if (NewAttr && isRelevantAttr(*this, New, NewAttr)) in InstantiateAttrsForDecl()
723 New->addAttr(NewAttr); in InstantiateAttrsForDecl()
743 const Decl *Tmpl, Decl *New, in InstantiateAttrs() argument
747 if (!isRelevantAttr(*this, New, TmplAttr)) in InstantiateAttrs()
753 instantiateDependentAlignedAttr(*this, TemplateArgs, Aligned, New); in InstantiateAttrs()
758 instantiateDependentAssumeAlignedAttr(*this, TemplateArgs, AssumeAligned, New); in InstantiateAttrs()
763 instantiateDependentAlignValueAttr(*this, TemplateArgs, AlignValue, New); in InstantiateAttrs()
768 instantiateDependentAllocAlignAttr(*this, TemplateArgs, AllocAlign, New); in InstantiateAttrs()
773 instantiateDependentAnnotationAttr(*this, TemplateArgs, Annotate, New); in InstantiateAttrs()
779 cast<FunctionDecl>(New)); in InstantiateAttrs()
785 cast<FunctionDecl>(New)); in InstantiateAttrs()
792 *CUDALaunchBounds, New); in InstantiateAttrs()
797 instantiateDependentModeAttr(*this, TemplateArgs, *Mode, New); in InstantiateAttrs()
802 instantiateOMPDeclareSimdDeclAttr(*this, TemplateArgs, *OMPAttr, New); in InstantiateAttrs()
807 instantiateOMPDeclareVariantAttr(*this, TemplateArgs, *OMPAttr, New); in InstantiateAttrs()
814 *this, TemplateArgs, *AMDGPUFlatWorkGroupSize, New); in InstantiateAttrs()
820 *AMDGPUFlatWorkGroupSize, New); in InstantiateAttrs()
826 *this, TemplateArgs, *AMDGPUMaxNumWorkGroups, New); in InstantiateAttrs()
831 New); in InstantiateAttrs()
838 if (New->hasAttr<DLLExportAttr>() || New->hasAttr<DLLImportAttr>()) { in InstantiateAttrs()
844 Swift().AddParameterABIAttr(New, *ABIAttr, ABIAttr->getABI()); in InstantiateAttrs()
850 ObjC().AddXConsumedAttr(New, *TmplAttr, in InstantiateAttrs()
857 if (!New->hasAttr<PointerAttr>()) in InstantiateAttrs()
858 New->addAttr(A->clone(Context)); in InstantiateAttrs()
863 if (!New->hasAttr<OwnerAttr>()) in InstantiateAttrs()
864 New->addAttr(A->clone(Context)); in InstantiateAttrs()
869 instantiateDependentSYCLKernelAttr(*this, TemplateArgs, *A, New); in InstantiateAttrs()
880 LateAttrs->push_back(LateInstantiatedAttribute(TmplAttr, Saved, New)); in InstantiateAttrs()
883 auto *ND = cast<NamedDecl>(New); in InstantiateAttrs()
890 if (NewAttr && isRelevantAttr(*this, New, TmplAttr)) in InstantiateAttrs()
891 New->addAttr(NewAttr); in InstantiateAttrs()
4735 TemplateDeclInstantiator::InitFunctionInstantiation(FunctionDecl *New, in InitFunctionInstantiation() argument
4737 New->setImplicit(Tmpl->isImplicit()); in InitFunctionInstantiation()
4740 SemaRef.Context.setManglingNumber(New, in InitFunctionInstantiation()
4762 ActiveInst.Entity = New; in InitFunctionInstantiation()
4791 = New->getType()->getAs<FunctionProtoType>(); in InitFunctionInstantiation()
4795 EPI.ExceptionSpec.SourceDecl = New; in InitFunctionInstantiation()
4797 New->setType(SemaRef.Context.getFunctionType( in InitFunctionInstantiation()
4800 Sema::ContextRAII SwitchContext(SemaRef, New); in InitFunctionInstantiation()
4801 SemaRef.SubstExceptionSpec(New, Proto, TemplateArgs); in InitFunctionInstantiation()
4809 SemaRef.InstantiateAttrs(TemplateArgs, Definition, New, in InitFunctionInstantiation()
4821 TemplateDeclInstantiator::InitMethodInstantiation(CXXMethodDecl *New, in InitMethodInstantiation() argument
4823 if (InitFunctionInstantiation(New, Tmpl)) in InitMethodInstantiation()
4826 if (isa<CXXDestructorDecl>(New) && SemaRef.getLangOpts().CPlusPlus11) in InitMethodInstantiation()
4827 SemaRef.AdjustDestructorExceptionSpec(cast<CXXDestructorDecl>(New)); in InitMethodInstantiation()
4829 New->setAccess(Tmpl->getAccess()); in InitMethodInstantiation()
4831 New->setVirtualAsWritten(true); in InitMethodInstantiation()
4837 bool TemplateDeclInstantiator::SubstDefaultedFunction(FunctionDecl *New, in SubstDefaultedFunction() argument
4845 NamedDecl *D = SemaRef.FindInstantiatedDecl(New->getLocation(), in SubstDefaultedFunction()
4855 New->setDefaultedOrDeletedInfo( in SubstDefaultedFunction()
4861 SemaRef.SetDeclDefaulted(New, Tmpl->getLocation()); in SubstDefaultedFunction()
5709 Sema::InstantiateMemInitializers(CXXConstructorDecl *New, in InstantiateMemInitializers() argument
5741 New->setInvalidDecl(); in InstantiateMemInitializers()
5762 New->getDeclName()); in InstantiateMemInitializers()
5771 New->getParent(), in InstantiateMemInitializers()
5797 New->getDeclName()); in InstantiateMemInitializers()
5800 New->setInvalidDecl(); in InstantiateMemInitializers()
5806 New->getParent(), EllipsisLoc); in InstantiateMemInitializers()
5817 New->setInvalidDecl(); in InstantiateMemInitializers()
5831 New->setInvalidDecl(); in InstantiateMemInitializers()
5841 New->setInvalidDecl(); in InstantiateMemInitializers()
5848 ActOnMemInitializers(New, in InstantiateMemInitializers()