================
@@ -7735,7 +7735,8 @@ ExprResult Sema::BuildResolvedCallExpr(Expr *Fn, 
NamedDecl *NDecl,
   }
 
   if (CXXMethodDecl *Method = dyn_cast_or_null<CXXMethodDecl>(FDecl))
-    if (Method->isImplicitObjectMemberFunction())
+    if (!isa<RequiresExprBodyDecl>(CurContext) &&
----------------
jcsxky wrote:

@erichkeane I am still feeling that we have no need to check whether the method 
has a explicit object parameter in require clause. In type requirement, 
checking nested member is enough(name resolution and parameter checking has 
already completed) and we don't need object argument since it isn't a function 
call.
```cpp
struct S {
  void foo() {}
};
void bar() {
  S::foo(); // need object parameter
  foo();    // name resolution failed
```
It is only doing a function call that object parameter is required.

https://github.com/llvm/llvm-project/pull/85198
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to