[clang] [Clang] [Sema] Handle placeholders in '.*' expressions (PR #83103)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 27 06:22:32 PST 2024
================
@@ -14474,6 +14474,23 @@ ExprResult Sema::CreateOverloadedBinOp(SourceLocation OpLoc,
CurFPFeatureOverrides());
}
+ // If this is the .* operator, which is not overloadable, just
+ // create a built-in binary operator.
+ if (Opc == BO_PtrMemD) {
+ auto CheckPlaceholder = [&](Expr *&Arg) {
+ ExprResult Res = CheckPlaceholderExpr(Arg);
+ if (!Res.isInvalid())
+ Arg = Res.get();
+ return Res.isInvalid();
----------------
AaronBallman wrote:
Do we perhaps want to use `!Res.isUsable()` because `CreateBuiltinBinOp()` expects the `Expr *`s to be nonnull?
https://github.com/llvm/llvm-project/pull/83103
More information about the cfe-commits
mailing list