================ @@ -76,11 +77,30 @@ static void appendParameterTypes(const CIRGenTypes &cgt, cgt.getCGModule().errorNYI("appendParameterTypes: hasExtParameterInfos"); } +/// Derives the 'this' type for CIRGen purposes, i.e. ignoring method CVR +/// qualification. Either or both of `rd` and `md` may be null. A null `rd` +/// indicates that there is no meaningful 'this' type, and a null `md` can occur +/// when calling a method pointer. +CanQualType CIRGenTypes::deriveThisType(const CXXRecordDecl *rd, + const CXXMethodDecl *md) { + QualType recTy; + if (rd) + recTy = getASTContext().getTagDeclType(rd)->getCanonicalTypeInternal(); + else + recTy = getASTContext().VoidTy; ---------------- bcardosolopes wrote:
Is this path covered in the tests below? Looks like it's not but I might be missing something. https://github.com/llvm/llvm-project/pull/140290 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits