Lines Matching refs:CSM
4993 CXXSpecialMember CSM = getSpecialMember(M); in CheckCompletedCXXClass() local
4995 if (CSM != CXXInvalid) { in CheckCompletedCXXClass()
4996 M->setTrivial(SpecialMemberIsTrivial(M, CSM)); in CheckCompletedCXXClass()
5007 (CSM == CXXDefaultConstructor || CSM == CXXCopyConstructor || in CheckCompletedCXXClass()
5008 CSM == CXXDestructor)) in CheckCompletedCXXClass()
5054 Sema &S, CXXRecordDecl *Class, Sema::CXXSpecialMember CSM, in lookupCallFromSpecialMember() argument
5057 if (CSM == Sema::CXXCopyAssignment || CSM == Sema::CXXMoveAssignment) in lookupCallFromSpecialMember()
5061 if (CSM == Sema::CXXDefaultConstructor || CSM == Sema::CXXDestructor) in lookupCallFromSpecialMember()
5066 return S.LookupSpecialMember(Class, CSM, in lookupCallFromSpecialMember()
5159 Sema::CXXSpecialMember CSM, unsigned Quals, in specialMemberIsConstexpr() argument
5166 assert(CSM == Sema::CXXDefaultConstructor); in specialMemberIsConstexpr()
5173 if (CSM == Sema::CXXDefaultConstructor) in specialMemberIsConstexpr()
5177 lookupCallFromSpecialMember(S, ClassDecl, CSM, Quals, ConstRHS); in specialMemberIsConstexpr()
5188 Sema &S, CXXRecordDecl *ClassDecl, Sema::CXXSpecialMember CSM, in defaultedSpecialMemberIsConstexpr() argument
5197 switch (CSM) { in defaultedSpecialMemberIsConstexpr()
5235 return CSM == Sema::CXXDefaultConstructor in defaultedSpecialMemberIsConstexpr()
5258 if (!specialMemberIsConstexpr(S, BaseClassDecl, CSM, 0, ConstArg, in defaultedSpecialMemberIsConstexpr()
5273 if (CSM == Sema::CXXDefaultConstructor && F->hasInClassInitializer()) in defaultedSpecialMemberIsConstexpr()
5278 if (!specialMemberIsConstexpr(S, FieldRecDecl, CSM, in defaultedSpecialMemberIsConstexpr()
5282 } else if (CSM == Sema::CXXDefaultConstructor) { in defaultedSpecialMemberIsConstexpr()
5352 CXXSpecialMember CSM = getSpecialMember(MD); in CheckExplicitlyDefaultedSpecialMember() local
5354 assert(MD->isExplicitlyDefaulted() && CSM != CXXInvalid && in CheckExplicitlyDefaultedSpecialMember()
5371 if (CSM == CXXDefaultConstructor || CSM == CXXDestructor) in CheckExplicitlyDefaultedSpecialMember()
5378 << CSM << MD->getSourceRange(); in CheckExplicitlyDefaultedSpecialMember()
5382 << CSM << MD->getSourceRange(); in CheckExplicitlyDefaultedSpecialMember()
5389 if (CSM == CXXCopyConstructor) in CheckExplicitlyDefaultedSpecialMember()
5391 else if (CSM == CXXCopyAssignment) in CheckExplicitlyDefaultedSpecialMember()
5395 if (CSM == CXXCopyAssignment || CSM == CXXMoveAssignment) { in CheckExplicitlyDefaultedSpecialMember()
5402 << (CSM == CXXMoveAssignment) << ExpectedReturnType; in CheckExplicitlyDefaultedSpecialMember()
5409 << (CSM == CXXMoveAssignment) << getLangOpts().CPlusPlus14; in CheckExplicitlyDefaultedSpecialMember()
5424 diag::err_defaulted_special_member_volatile_param) << CSM; in CheckExplicitlyDefaultedSpecialMember()
5429 if (CSM == CXXCopyConstructor || CSM == CXXCopyAssignment) { in CheckExplicitlyDefaultedSpecialMember()
5432 << (CSM == CXXCopyAssignment); in CheckExplicitlyDefaultedSpecialMember()
5437 << (CSM == CXXMoveAssignment); in CheckExplicitlyDefaultedSpecialMember()
5444 assert(CSM == CXXCopyAssignment && "unexpected non-ref argument"); in CheckExplicitlyDefaultedSpecialMember()
5456 bool Constexpr = defaultedSpecialMemberIsConstexpr(*this, RD, CSM, in CheckExplicitlyDefaultedSpecialMember()
5462 Diag(MD->getLocStart(), diag::err_incorrect_defaulted_constexpr) << CSM; in CheckExplicitlyDefaultedSpecialMember()
5501 if (ShouldDeleteSpecialMember(MD, CSM)) { in CheckExplicitlyDefaultedSpecialMember()
5508 Diag(MD->getLocation(), diag::err_out_of_line_default_deletes) << CSM; in CheckExplicitlyDefaultedSpecialMember()
5509 ShouldDeleteSpecialMember(MD, CSM, nullptr, /*Diagnose*/true); in CheckExplicitlyDefaultedSpecialMember()
5569 Sema::CXXSpecialMember CSM; member
5580 Sema::CXXSpecialMember CSM, in SpecialMemberDeletionInfo()
5582 : S(S), MD(MD), CSM(CSM), ICI(ICI), Diagnose(Diagnose), in SpecialMemberDeletionInfo()
5585 switch (CSM) { in SpecialMemberDeletionInfo()
5617 return ICI ? Sema::CXXInvalid : CSM; in getEffectiveCSM()
5623 return lookupCallFromSpecialMember(S, Class, CSM, Quals, in lookupIn()
5735 if (!(CSM == Sema::CXXDefaultConstructor && in shouldDeleteForClassSubobject()
5766 assert(CSM == Sema::CXXDefaultConstructor); in shouldDeleteForBase()
5792 if (CSM == Sema::CXXDefaultConstructor) { in shouldDeleteForField()
5816 } else if (CSM == Sema::CXXCopyConstructor) { in shouldDeleteForField()
5864 if (CSM == Sema::CXXDefaultConstructor && AllVariantFieldsAreConst && in shouldDeleteForField()
5892 if (CSM == Sema::CXXDefaultConstructor && inUnion() && AllFieldsAreConst && in shouldDeleteForAllConstMembers()
5906 bool Sema::ShouldDeleteSpecialMember(CXXMethodDecl *MD, CXXSpecialMember CSM, in ShouldDeleteSpecialMember() argument
5921 (CSM == CXXDefaultConstructor || CSM == CXXCopyAssignment)) { in ShouldDeleteSpecialMember()
5930 if (CSM != CXXDefaultConstructor && CSM != CXXDestructor && in ShouldDeleteSpecialMember()
5939 (CSM == CXXCopyConstructor || CSM == CXXCopyAssignment)) { in ShouldDeleteSpecialMember()
5945 (!getLangOpts().MSVCCompat || CSM == CXXCopyConstructor)) { in ShouldDeleteSpecialMember()
5957 (!getLangOpts().MSVCCompat || CSM == CXXCopyAssignment)) { in ShouldDeleteSpecialMember()
5973 << (CSM == CXXCopyAssignment) << RD in ShouldDeleteSpecialMember()
5985 if (CSM == CXXDestructor && MD->isVirtual()) { in ShouldDeleteSpecialMember()
5997 SpecialMemberDeletionInfo SMI(*this, MD, CSM, ICI, Diagnose); in ShouldDeleteSpecialMember()
6023 return inferCUDATargetForImplicitSpecialMember(RD, CSM, MD, SMI.ConstArg, in ShouldDeleteSpecialMember()
6039 Sema::CXXSpecialMember CSM, unsigned Quals, in findTrivialSpecialMember() argument
6044 switch (CSM) { in findTrivialSpecialMember()
6130 lookupCallFromSpecialMember(S, RD, CSM, Quals, ConstRHS); in findTrivialSpecialMember()
6185 Sema::CXXSpecialMember CSM, in checkTrivialSubobjectCall() argument
6193 if (findTrivialSpecialMember(S, SubRD, CSM, SubType.getCVRQualifiers(), in checkTrivialSubobjectCall()
6201 if (!Selected && CSM == Sema::CXXDefaultConstructor) { in checkTrivialSubobjectCall()
6208 << Kind << SubType.getUnqualifiedType() << CSM << SubType; in checkTrivialSubobjectCall()
6212 << Kind << SubType.getUnqualifiedType() << CSM; in checkTrivialSubobjectCall()
6215 << Kind << SubType.getUnqualifiedType() << CSM; in checkTrivialSubobjectCall()
6221 << Kind << SubType.getUnqualifiedType() << CSM; in checkTrivialSubobjectCall()
6224 S.SpecialMemberIsTrivial(Selected, CSM, Diagnose); in checkTrivialSubobjectCall()
6234 Sema::CXXSpecialMember CSM, in checkTrivialClassMembers() argument
6245 CSM, ConstArg, Diagnose)) in checkTrivialClassMembers()
6254 if (CSM == Sema::CXXDefaultConstructor && FI->hasInClassInitializer()) { in checkTrivialClassMembers()
6274 CSM, TSK_Field, Diagnose)) in checkTrivialClassMembers()
6283 void Sema::DiagnoseNontrivial(const CXXRecordDecl *RD, CXXSpecialMember CSM) { in DiagnoseNontrivial() argument
6286 bool ConstArg = (CSM == CXXCopyConstructor || CSM == CXXCopyAssignment); in DiagnoseNontrivial()
6287 checkTrivialSubobjectCall(*this, RD->getLocation(), Ty, ConstArg, CSM, in DiagnoseNontrivial()
6294 bool Sema::SpecialMemberIsTrivial(CXXMethodDecl *MD, CXXSpecialMember CSM, in SpecialMemberIsTrivial() argument
6296 assert(!MD->isUserProvided() && CSM != CXXInvalid && "not special enough"); in SpecialMemberIsTrivial()
6305 switch (CSM) { in SpecialMemberIsTrivial()
6372 ConstArg, CSM, TSK_BaseClass, Diagnose)) in SpecialMemberIsTrivial()
6387 if (!checkTrivialClassMembers(*this, RD, CSM, ConstArg, Diagnose)) in SpecialMemberIsTrivial()
6393 if (CSM == CXXDestructor && MD->isVirtual()) { in SpecialMemberIsTrivial()
6402 if (CSM != CXXDestructor && MD->getParent()->isDynamicClass()) { in SpecialMemberIsTrivial()
9094 DeclaringSpecialMember(Sema &S, CXXRecordDecl *RD, Sema::CXXSpecialMember CSM) in DeclaringSpecialMember()
9095 : S(S), D(RD, CSM), SavedContext(S, RD) { in DeclaringSpecialMember()