Lines Matching defs:New
94 const AlignedAttr *Aligned, Decl *New, bool IsPackExpansion) {
101 S.AddAlignedAttr(New, *Aligned, Result.getAs<Expr>(), IsPackExpansion);
109 S.AddAlignedAttr(New, *Aligned, Result, IsPackExpansion);
116 const AlignedAttr *Aligned, Decl *New) {
118 instantiateDependentAlignedAttr(S, TemplateArgs, Aligned, New, false);
143 instantiateDependentAlignedAttr(S, TemplateArgs, Aligned, New, true);
147 instantiateDependentAlignedAttr(S, TemplateArgs, Aligned, New, false);
154 const AssumeAlignedAttr *Aligned, Decl *New) {
172 S.AddAssumeAlignedAttr(New, *Aligned, E, OE);
177 const AlignValueAttr *Aligned, Decl *New) {
183 S.AddAlignValueAttr(New, *Aligned, Result.getAs<Expr>());
188 const AllocAlignAttr *Align, Decl *New) {
193 S.AddAllocAlignAttr(New, *Align, Param);
198 const AnnotateAttr *Attr, Decl *New) {
231 S.AddAnnotationAttr(New, *Attr, Str, Args);
236 const Attr *A, Expr *OldCond, const Decl *Tmpl, FunctionDecl *New) {
239 Sema::ContextRAII SwitchContext(S, New);
256 !Expr::isPotentialConstantExprUnevaluated(Cond, New, Diags)) {
267 const EnableIfAttr *EIA, const Decl *Tmpl, FunctionDecl *New) {
269 S, TemplateArgs, EIA, EIA->getCond(), Tmpl, New);
272 New->addAttr(new (S.getASTContext()) EnableIfAttr(S.getASTContext(), *EIA,
278 const DiagnoseIfAttr *DIA, const Decl *Tmpl, FunctionDecl *New) {
280 S, TemplateArgs, DIA, DIA->getCond(), Tmpl, New);
283 New->addAttr(new (S.getASTContext()) DiagnoseIfAttr(
285 DIA->getDiagnosticType(), DIA->getArgDependent(), New));
288 // Constructs and adds to New a new instance of CUDALaunchBoundsAttr using
292 const CUDALaunchBoundsAttr &Attr, Decl *New) {
318 S.AddLaunchBoundsAttr(New, Attr, MaxThreads, MinBlocks, MaxBlocks);
324 const ModeAttr &Attr, Decl *New) {
325 S.AddModeAttr(New, Attr, Attr.getMode(),
332 const OMPDeclareSimdDeclAttr &Attr, Decl *New) {
334 if (auto *FTD = dyn_cast<FunctionTemplateDecl>(New))
335 New = FTD->getTemplatedDecl();
336 auto *FD = cast<FunctionDecl>(New);
407 S.ConvertDeclToDeclGroup(New), Attr.getBranchState(), Simdlen.get(),
415 const OMPDeclareVariantAttr &Attr, Decl *New) {
417 if (auto *FTD = dyn_cast<FunctionTemplateDecl>(New))
418 New = FTD->getTemplatedDecl();
419 auto *FD = cast<FunctionDecl>(New);
484 S.ConvertDeclToDeclGroup(New), E, TI, Attr.appendArgs_size(),
503 New->getLocation());
513 New->getLocation(), SubstFD, /* Recursive */ true,
553 const AMDGPUFlatWorkGroupSizeAttr &Attr, Decl *New) {
568 S.AMDGPU().addAMDGPUFlatWorkGroupSizeAttr(New, Attr, MinExpr, MaxExpr);
594 const AMDGPUWavesPerEUAttr &Attr, Decl *New) {
612 S.AMDGPU().addAMDGPUWavesPerEUAttr(New, Attr, MinExpr, MaxExpr);
617 const AMDGPUMaxNumWorkGroupsAttr &Attr, Decl *New) {
635 S.AMDGPU().addAMDGPUMaxNumWorkGroupsAttr(New, Attr, XExpr, YExpr, ZExpr);
643 const SYCLKernelAttr &Attr, Decl *New) {
644 New->addAttr(Attr.clone(S.getASTContext()));
696 const HLSLParamModifierAttr *Attr, Decl *New) {
697 ParmVarDecl *P = cast<ParmVarDecl>(New);
704 Decl *New, LateInstantiatedAttrVec *LateAttrs,
706 if (NamedDecl *ND = dyn_cast<NamedDecl>(New)) {
711 if (!isRelevantAttr(*this, New, TmplAttr))
722 if (NewAttr && isRelevantAttr(*this, New, NewAttr))
723 New->addAttr(NewAttr);
743 const Decl *Tmpl, Decl *New,
747 if (!isRelevantAttr(*this, New, TmplAttr))
753 instantiateDependentAlignedAttr(*this, TemplateArgs, Aligned, New);
758 instantiateDependentAssumeAlignedAttr(*this, TemplateArgs, AssumeAligned, New);
763 instantiateDependentAlignValueAttr(*this, TemplateArgs, AlignValue, New);
768 instantiateDependentAllocAlignAttr(*this, TemplateArgs, AllocAlign, New);
773 instantiateDependentAnnotationAttr(*this, TemplateArgs, Annotate, New);
779 cast<FunctionDecl>(New));
785 cast<FunctionDecl>(New));
792 *CUDALaunchBounds, New);
797 instantiateDependentModeAttr(*this, TemplateArgs, *Mode, New);
802 instantiateOMPDeclareSimdDeclAttr(*this, TemplateArgs, *OMPAttr, New);
807 instantiateOMPDeclareVariantAttr(*this, TemplateArgs, *OMPAttr, New);
814 *this, TemplateArgs, *AMDGPUFlatWorkGroupSize, New);
820 *AMDGPUFlatWorkGroupSize, New);
826 *this, TemplateArgs, *AMDGPUMaxNumWorkGroups, New);
831 New);
838 if (New->hasAttr<DLLExportAttr>() || New->hasAttr<DLLImportAttr>()) {
844 Swift().AddParameterABIAttr(New, *ABIAttr, ABIAttr->getABI());
850 ObjC().AddXConsumedAttr(New, *TmplAttr,
857 if (!New->hasAttr<PointerAttr>())
858 New->addAttr(A->clone(Context));
863 if (!New->hasAttr<OwnerAttr>())
864 New->addAttr(A->clone(Context));
869 instantiateDependentSYCLKernelAttr(*this, TemplateArgs, *A, New);
880 LateAttrs->push_back(LateInstantiatedAttribute(TmplAttr, Saved, New));
883 auto *ND = cast<NamedDecl>(New);
890 if (NewAttr && isRelevantAttr(*this, New, TmplAttr))
891 New->addAttr(NewAttr);
4729 /// declaration (New) from the corresponding fields of its template (Tmpl).
4733 TemplateDeclInstantiator::InitFunctionInstantiation(FunctionDecl *New,
4735 New->setImplicit(Tmpl->isImplicit());
4738 SemaRef.Context.setManglingNumber(New,
4760 ActiveInst.Entity = New;
4789 = New->getType()->getAs<FunctionProtoType>();
4793 EPI.ExceptionSpec.SourceDecl = New;
4795 New->setType(SemaRef.Context.getFunctionType(
4798 Sema::ContextRAII SwitchContext(SemaRef, New);
4799 SemaRef.SubstExceptionSpec(New, Proto, TemplateArgs);
4807 SemaRef.InstantiateAttrs(TemplateArgs, Definition, New,
4814 /// declaration (New) from the corresponding fields of its template
4819 TemplateDeclInstantiator::InitMethodInstantiation(CXXMethodDecl *New,
4821 if (InitFunctionInstantiation(New, Tmpl))
4824 if (isa<CXXDestructorDecl>(New) && SemaRef.getLangOpts().CPlusPlus11)
4825 SemaRef.AdjustDestructorExceptionSpec(cast<CXXDestructorDecl>(New));
4827 New->setAccess(Tmpl->getAccess());
4829 New->setVirtualAsWritten(true);
4831 // FIXME: New needs a pointer to Tmpl
4835 bool TemplateDeclInstantiator::SubstDefaultedFunction(FunctionDecl *New,
4843 NamedDecl *D = SemaRef.FindInstantiatedDecl(New->getLocation(),
4853 New->setDefaultedOrDeletedInfo(
4859 SemaRef.SetDeclDefaulted(New, Tmpl->getLocation());
5707 Sema::InstantiateMemInitializers(CXXConstructorDecl *New,
5739 New->setInvalidDecl();
5760 New->getDeclName());
5769 New->getParent(),
5795 New->getDeclName());
5798 New->setInvalidDecl();
5804 New->getParent(), EllipsisLoc);
5815 New->setInvalidDecl();
5829 New->setInvalidDecl();
5839 New->setInvalidDecl();
5846 ActOnMemInitializers(New,