Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions clang/lib/Sema/SemaExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6963,8 +6963,7 @@ ExprResult Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl,
}

if (CXXMethodDecl *Method = dyn_cast_or_null<CXXMethodDecl>(FDecl))
if (!isa<RequiresExprBodyDecl>(CurContext) &&
Method->isImplicitObjectMemberFunction())
if (Method->isImplicitObjectMemberFunction())
return ExprError(Diag(LParenLoc, diag::err_member_call_without_object)
<< Fn->getSourceRange() << 0);

Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Sema/TreeTransform.h
Original file line number Diff line number Diff line change
Expand Up @@ -13907,7 +13907,7 @@ bool TreeTransform<Derived>::TransformOverloadExprDecls(OverloadExpr *Old,
}

AllEmptyPacks &= Decls.empty();
};
}

// C++ [temp.res]/8.4.2:
// The program is ill-formed, no diagnostic required, if [...] lookup for
Expand Down
23 changes: 0 additions & 23 deletions clang/test/SemaCXX/PR84020.cpp

This file was deleted.

31 changes: 31 additions & 0 deletions clang/test/SemaTemplate/instantiate-requires-expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,3 +237,34 @@ constexpr bool e_v = true;
static_assert(e_v<bool>);

} // namespace GH73885

namespace GH84020 {

struct B {
template <typename S> void foo();
void bar();
};

template <typename T, typename S> struct A : T {
void foo() {
static_assert(requires { T::template foo<S>(); });
static_assert(requires { T::bar(); });
}
};

template class A<B, double>;

} // namespace GH84020

namespace GH110785 {

struct Foo {
static void f(auto) requires(false) {}
void f(int) {}

static_assert([](auto v) {
return requires { f(v); };
} (0) == false);
};

} // namespace GH110785
Loading