[clang] [Clang][Sema] Fix issue on requires expression with templated base class member function (PR #85198)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 12 15:19:44 PDT 2024


================
@@ -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) &&
----------------
erichkeane wrote:

I still dont think 'implictObjectMemberFunction' is the right thing here.  Why does the fact that it is not a 'Explit Object Member Function' matter?  

like:
```
struct S {
void foo(this S){}
};
void bar() {
S::foo();
};
```
??

Or static member functions?  This solution just doesn't seem right to me, and your responses dont' make it more clear.

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


More information about the cfe-commits mailing list