================
@@ -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 noticed that, and the incubator does the same thing, but if the dyn_cast
returns null, both just fall through to the indirect reference handling, and I
couldn't find a case where that actually happens so I wasn't confident that it
was the right thing to do. We made the same change (`if (dyn_cast...)` ->
`cast`) just above this in the DeclRefExpr handling.
https://github.com/llvm/llvm-project/pull/164518
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits