Home | History | Annotate | Download | only in Sema

Lines Matching refs:FD

420 static bool functionDeclHasDefaultArgument(const FunctionDecl *FD) {
421 for (unsigned NumParams = FD->getNumParams(); NumParams > 0; --NumParams) {
422 const ParmVarDecl *PVD = FD->getParamDecl(NumParams-1);
712 void Sema::CheckCXXDefaultArguments(FunctionDecl *FD) {
713 unsigned NumParams = FD->getNumParams();
718 ParmVarDecl *Param = FD->getParamDecl(p);
731 ParmVarDecl *Param = FD->getParamDecl(p);
753 ParmVarDecl *Param = FD->getParamDecl(p);
765 const FunctionDecl *FD) {
767 const FunctionProtoType *FT = FD->getType()->getAs<FunctionProtoType>();
771 const ParmVarDecl *PD = FD->getParamDecl(ArgIndex);
777 isa<CXXConstructorDecl>(FD)))
1208 if (FieldDecl *FD = I->getMember())
1209 Inits.insert(FD);
1979 static bool InitializationHasSideEffects(const FieldDecl &FD) {
1980 const Type *T = FD.getType()->getBaseElementTypeUnsafe();
2251 FieldDecl *FD = cast<FieldDecl>(Member);
2252 FieldCollector->Add(FD);
2254 if (!Diags.isIgnored(diag::warn_unused_private_field, FD->getLocation())) {
2257 if (!FD->isImplicit() && FD->getDeclName() &&
2258 FD->getAccess() == AS_private &&
2259 !FD->hasAttr<UnusedAttr>() &&
2260 !FD->getParent()->isDependentContext() &&
2261 !InitializationHasSideEffects(*FD))
2262 UnusedPrivateFields.insert(FD);
2305 FieldDecl *FD = dyn_cast<FieldDecl>(ME->getMemberDecl());
2306 if (!FD)
2308 Fields.push_back(FD);
2309 if (FD->getType()->isReferenceType())
2358 if (FieldDecl *FD = dyn_cast<FieldDecl>(SubME->getMemberDecl()))
2359 if (!FD->isAnonymousStructOrUnion())
2549 if (FunctionDecl *FD = E->getDirectCallee()) {
2550 if (FD->isInStdNamespace() && FD->getIdentifier() &&
2551 FD->getIdentifier()->isStr("move")) {
2577 if (FieldDecl *FD = dyn_cast<FieldDecl>(ME->getMemberDecl()))
2578 if (!FD->getType()->isReferenceType())
2579 DeclsToRemove.push_back(FD);
2633 if (auto *FD = dyn_cast<FieldDecl>(I)) {
2634 UninitializedFields.insert(FD);
2695 FieldDecl *FD = dyn_cast<FieldDecl>(D);
2696 assert((isa<MSPropertyDecl>(D) || FD->getInClassInitStyle() != ICIS_NoInit) &&
2701 if (FD)
2702 FD->removeInClassInitializer();
2707 FD->setInvalidDecl();
2708 FD->removeInClassInitializer();
2713 if (!FD->getType()->isDependentType() && !InitExpr->isTypeDependent()) {
2714 InitializedEntity Entity = InitializedEntity::InitializeMember(FD);
2715 InitializationKind Kind = FD->getInClassInitStyle() == ICIS_ListInit
2721 FD->setInvalidDecl();
2731 FD->setInvalidDecl();
2737 FD->setInClassInitializer(InitExpr);
3914 FieldDecl *FD = dyn_cast<FieldDecl>(C);
3915 if (FD && FD->getParent()->isUnion())
3917 FD->getParent()->getCanonicalDecl(), FD->getCanonicalDecl()));
3919 } else if (FieldDecl *FD = Member->getMember()) {
3920 if (FD->getParent()->isUnion())
3922 FD->getParent()->getCanonicalDecl(), FD->getCanonicalDecl()));
4648 FunctionDecl *FD = cast<FunctionTemplateDecl>(D)->getTemplatedDecl();
4649 CheckAbstractClassUsage(Info, cast<CXXMethodDecl>(FD));
4653 FieldDecl *FD = cast<FieldDecl>(D);
4654 if (TypeSourceInfo *TSI = FD->getTypeSourceInfo())
4655 Info.CheckType(FD, TSI->getTypeLoc(), Sema::AbstractFieldType);
5500 bool shouldDeleteForField(FieldDecl *FD);
5634 bool SpecialMemberDeletionInfo::shouldDeleteForField(FieldDecl *FD) {
5635 QualType FieldType = S.Context.getBaseElementType(FD->getType());
5641 if (FieldType->isReferenceType() && !FD->hasInClassInitializer()) {
5643 S.Diag(FD->getLocation(), diag::note_deleted_default_ctor_uninit_field)
5644 << MD->getParent() << FD << FieldType << /*Reference*/0;
5652 !FD->hasInClassInitializer() &&
5655 S.Diag(FD->getLocation(), diag::note_deleted_default_ctor_uninit_field)
5656 << MD->getParent() << FD << FD->getType() << /*Const*/1;
5667 S.Diag(FD->getLocation(), diag::note_deleted_copy_ctor_rvalue_reference)
5668 << MD->getParent() << FD << FieldType;
5675 S.Diag(FD->getLocation(), diag::note_deleted_assign_field)
5676 << IsMove << MD->getParent() << FD << FieldType << /*Reference*/0;
5683 S.Diag(FD->getLocation(), diag::note_deleted_assign_field)
5684 << IsMove << MD->getParent() << FD << FD->getType() << /*Const*/1;
5724 if (shouldDeleteForClassSubobject(FieldRecord, FD,
6522 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
6523 if (FunctionTemplateDecl *FTD = FD->getDescribedFunctionTemplate())
7806 if (FunctionDecl *FD = Target->getAsFunction()) {
7808 switch (CheckOverload(nullptr, FD, Previous, OldDecl,
9059 const FunctionDecl *FD = (*I)->getTemplatedDecl();
9060 if (const CXXConstructorDecl *CD = dyn_cast<CXXConstructorDecl>(FD))
11142 bool Sema::isImplicitlyDeleted(FunctionDecl *FD) {
11143 return FD->isDeleted() && FD->isDefaulted() && isa<CXXMethodDecl>(FD);
12751 FunctionDecl *FD;
12753 FD = FTD->getTemplatedDecl();
12755 FD = cast<FunctionDecl>(ND);
12761 if (functionDeclHasDefaultArgument(FD)) {
12762 if (FunctionDecl *OldFD = FD->getPreviousDecl()) {
12763 Diag(FD->getLocation(), diag::err_friend_decl_with_def_arg_redeclared);
12766 Diag(FD->getLocation(), diag::err_friend_decl_with_def_arg_must_be_def);
12770 if (FD->getNumTemplateParameterLists() && SS.isValid()) {
12771 Diag(FD->getLocation(), diag::warn_template_qualified_friend_unsupported)