Skip to content

Commit 703d23b

Browse files
author
git apple-llvm automerger
committed
Merge commit 'f3f49528c419' from llvm.org/release/19.x into stable/20240723
2 parents cc24134 + f3f4952 commit 703d23b

File tree

4 files changed

+33
-26
lines changed

4 files changed

+33
-26
lines changed

clang/lib/Sema/SemaExpr.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6921,8 +6921,7 @@ ExprResult Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl,
69216921
}
69226922

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

clang/lib/Sema/TreeTransform.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13609,7 +13609,7 @@ bool TreeTransform<Derived>::TransformOverloadExprDecls(OverloadExpr *Old,
1360913609
}
1361013610

1361113611
AllEmptyPacks &= Decls.empty();
13612-
};
13612+
}
1361313613

1361413614
// C++ [temp.res]/8.4.2:
1361513615
// The program is ill-formed, no diagnostic required, if [...] lookup for

clang/test/SemaCXX/PR84020.cpp

Lines changed: 0 additions & 23 deletions
This file was deleted.

clang/test/SemaTemplate/instantiate-requires-expr.cpp

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,3 +237,34 @@ constexpr bool e_v = true;
237237
static_assert(e_v<bool>);
238238

239239
} // namespace GH73885
240+
241+
namespace GH84020 {
242+
243+
struct B {
244+
template <typename S> void foo();
245+
void bar();
246+
};
247+
248+
template <typename T, typename S> struct A : T {
249+
void foo() {
250+
static_assert(requires { T::template foo<S>(); });
251+
static_assert(requires { T::bar(); });
252+
}
253+
};
254+
255+
template class A<B, double>;
256+
257+
} // namespace GH84020
258+
259+
namespace GH110785 {
260+
261+
struct Foo {
262+
static void f(auto) requires(false) {}
263+
void f(int) {}
264+
265+
static_assert([](auto v) {
266+
return requires { f(v); };
267+
} (0) == false);
268+
};
269+
270+
} // namespace GH110785

0 commit comments

Comments
 (0)