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

Qizhi Hu via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 13 20:15:50 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) &&
----------------
jcsxky wrote:

And if only checking whether `Method` is a static method, we failed on:
https://github.com/llvm/llvm-project/blob/ef9446bd2d362ec90cd681ae59463d16bf671fe8/clang/test/CXX/drs/dr26xx.cpp#L225-L240

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


More information about the cfe-commits mailing list