Lines Matching defs:CSM
4577 CXXSpecialMember CSM = getSpecialMember(M);
4578 if (CSM != CXXInvalid) {
4579 M->setTrivial(SpecialMemberIsTrivial(M, CSM));
4655 /// \param CSM The kind of special member function.
4661 Sema &S, CXXRecordDecl *Class, Sema::CXXSpecialMember CSM,
4664 if (CSM == Sema::CXXCopyAssignment || CSM == Sema::CXXMoveAssignment)
4668 if (CSM == Sema::CXXDefaultConstructor || CSM == Sema::CXXDestructor)
4673 return S.LookupSpecialMember(Class, CSM,
4684 Sema::CXXSpecialMember CSM,
4687 lookupCallFromSpecialMember(S, ClassDecl, CSM, Quals, ConstRHS);
4698 Sema::CXXSpecialMember CSM,
4706 switch (CSM) {
4762 if (!specialMemberIsConstexpr(S, BaseClassDecl, CSM, 0, ConstArg))
4779 if (!specialMemberIsConstexpr(S, FieldRecDecl, CSM,
4854 CXXSpecialMember CSM = getSpecialMember(MD);
4856 assert(MD->isExplicitlyDefaulted() && CSM != CXXInvalid &&
4873 if (CSM == CXXDefaultConstructor || CSM == CXXDestructor)
4880 << CSM << MD->getSourceRange();
4884 << CSM << MD->getSourceRange();
4891 if (CSM == CXXCopyConstructor)
4893 else if (CSM == CXXCopyAssignment)
4897 if (CSM == CXXCopyAssignment || CSM == CXXMoveAssignment) {
4904 << (CSM == CXXMoveAssignment) << ExpectedReturnType;
4911 << (CSM == CXXMoveAssignment) << getLangOpts().CPlusPlus1y;
4926 diag::err_defaulted_special_member_volatile_param) << CSM;
4931 if (CSM == CXXCopyConstructor || CSM == CXXCopyAssignment) {
4934 << (CSM == CXXCopyAssignment);
4939 << (CSM == CXXMoveAssignment);
4946 assert(CSM == CXXCopyAssignment && "unexpected non-ref argument");
4958 bool Constexpr = defaultedSpecialMemberIsConstexpr(*this, RD, CSM,
4964 Diag(MD->getLocStart(), diag::err_incorrect_defaulted_constexpr) << CSM;
5003 if (ShouldDeleteSpecialMember(MD, CSM)) {
5010 Diag(MD->getLocation(), diag::err_out_of_line_default_deletes) << CSM;
5011 ShouldDeleteSpecialMember(MD, CSM, /*Diagnose*/true);
5070 Sema::CXXSpecialMember CSM;
5080 Sema::CXXSpecialMember CSM, bool Diagnose)
5081 : S(S), MD(MD), CSM(CSM), Diagnose(Diagnose),
5085 switch (CSM) {
5119 return lookupCallFromSpecialMember(S, Class, CSM, Quals,
5192 << CSM << MD->getParent() << /*IsField*/true
5198 << CSM << MD->getParent() << /*IsField*/false
5231 if (!(CSM == Sema::CXXDefaultConstructor &&
5264 if (CSM == Sema::CXXDefaultConstructor) {
5288 } else if (CSM == Sema::CXXCopyConstructor) {
5336 if (CSM == Sema::CXXDefaultConstructor && AllVariantFieldsAreConst &&
5364 if (CSM == Sema::CXXDefaultConstructor && inUnion() && AllFieldsAreConst &&
5378 bool Sema::ShouldDeleteSpecialMember(CXXMethodDecl *MD, CXXSpecialMember CSM,
5392 (CSM == CXXDefaultConstructor || CSM == CXXCopyAssignment)) {
5401 if (CSM != CXXDefaultConstructor && CSM != CXXDestructor &&
5410 (CSM == CXXCopyConstructor || CSM == CXXCopyAssignment)) {
5416 (!getLangOpts().MSVCCompat || CSM == CXXCopyConstructor)) {
5428 (!getLangOpts().MSVCCompat || CSM == CXXCopyAssignment)) {
5444 << (CSM == CXXCopyAssignment) << RD
5456 if (CSM == CXXDestructor && MD->isVirtual()) {
5468 SpecialMemberDeletionInfo SMI(*this, MD, CSM, Diagnose);
5503 Sema::CXXSpecialMember CSM, unsigned Quals,
5508 switch (CSM) {
5594 lookupCallFromSpecialMember(S, RD, CSM, Quals, ConstRHS);
5649 Sema::CXXSpecialMember CSM,
5657 if (findTrivialSpecialMember(S, SubRD, CSM, SubType.getCVRQualifiers(),
5665 if (!Selected && CSM == Sema::CXXDefaultConstructor) {
5672 << Kind << SubType.getUnqualifiedType() << CSM << SubType;
5676 << Kind << SubType.getUnqualifiedType() << CSM;
5679 << Kind << SubType.getUnqualifiedType() << CSM;
5685 << Kind << SubType.getUnqualifiedType() << CSM;
5688 S.SpecialMemberIsTrivial(Selected, CSM, Diagnose);
5698 Sema::CXXSpecialMember CSM,
5709 CSM, ConstArg, Diagnose))
5718 if (CSM == Sema::CXXDefaultConstructor && FI->hasInClassInitializer()) {
5738 CSM, TSK_Field, Diagnose))
5747 void Sema::DiagnoseNontrivial(const CXXRecordDecl *RD, CXXSpecialMember CSM) {
5750 bool ConstArg = (CSM == CXXCopyConstructor || CSM == CXXCopyAssignment);
5751 checkTrivialSubobjectCall(*this, RD->getLocation(), Ty, ConstArg, CSM,
5758 bool Sema::SpecialMemberIsTrivial(CXXMethodDecl *MD, CXXSpecialMember CSM,
5760 assert(!MD->isUserProvided() && CSM != CXXInvalid && "not special enough");
5769 switch (CSM) {
5836 ConstArg, CSM, TSK_BaseClass, Diagnose))
5851 if (!checkTrivialClassMembers(*this, RD, CSM, ConstArg, Diagnose))
5857 if (CSM == CXXDestructor && MD->isVirtual()) {
5866 if (CSM != CXXDestructor && MD->getParent()->isDynamicClass()) {
8390 DeclaringSpecialMember(Sema &S, CXXRecordDecl *RD, Sema::CXXSpecialMember CSM)
8391 : S(S), D(RD, CSM) {