[clang] [CIR] Upstream support for calling functions via member expressions (PR #164518)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 22 13:56:59 PDT 2025
================
@@ -1820,10 +1820,10 @@ CIRGenCallee CIRGenFunction::emitCallee(const clang::Expr *e) {
// Resolve direct calls.
const auto *funcDecl = cast<FunctionDecl>(declRef->getDecl());
return emitDirectCallee(funcDecl);
- } else if (isa<MemberExpr>(e)) {
- cgm.errorNYI(e->getSourceRange(),
- "emitCallee: call to member function is NYI");
- return {};
+ } else if (auto me = dyn_cast<MemberExpr>(e)) {
+ const auto *fd = cast<FunctionDecl>(me->getMemberDecl());
----------------
andykaylor wrote:
I was wrong. I found a way to make the cast fail.
https://github.com/llvm/llvm-project/pull/164518
More information about the cfe-commits
mailing list