[clang] [Clang] [Sema] Handle placeholders in '.*' expressions (PR #83103)

via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 27 09:19:27 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();
----------------
Sirraide wrote:

I was wondering what the difference between those two was, so thanks for pointing that out. We definitely want that one then.

https://github.com/llvm/llvm-project/pull/83103


More information about the cfe-commits mailing list