================ @@ -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:
In require body, name resolving just lookup function name and don't check function parameter without function call(I think). ```cpp struct B { template <typename S> void foo(int); void bar(); }; template <typename T, typename S> struct A : T { auto foo() { static_assert(requires { T::template foo<S>(); }); static_assert(requires { T::bar(); }); } }; int main() { A<B, double> a; //a.foo(0); } ``` After add a parameter to `foo`, this code also compiles correctly without calling. 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