================ @@ -1148,6 +1146,35 @@ mlir::Value CIRGenFunction::emitAlloca(StringRef name, mlir::Type ty, return addr; } +// Note: this function also emit constructor calls to support a MSVC extensions +// allowing explicit constructor function call. +RValue CIRGenFunction::emitCXXMemberCallExpr(const CXXMemberCallExpr *ce, + ReturnValueSlot returnValue) { + const Expr *callee = ce->getCallee()->IgnoreParens(); + + if (isa<BinaryOperator>(callee)) { + cgm.errorNYI(ce->getSourceRange(), + "emitCXXMemberCallExpr: C++ binary operator"); + return RValue::get(nullptr); + } + + const auto *me = cast<MemberExpr>(callee); + const auto *md = cast<CXXMethodDecl>(me->getMemberDecl()); + + if (md->isStatic()) { + cgm.errorNYI(ce->getSourceRange(), "emitCXXMemberCallExpr: static method"); + return RValue::get(nullptr); + } ---------------- andykaylor wrote:
This is marked NYI in the incubator. The classic codegen only has a couple of lines of code here to handle it, but I'd prefer to leave it for a later PR so I can properly investigate why the incubator didn't implement it. 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