aboutsummaryrefslogtreecommitdiff
path: root/libcxx/test/std/utilities/function.objects
diff options
context:
space:
mode:
authorShamshura Egor <164661612+egorshamshura@users.noreply.github.com>2025-07-08 13:58:34 +0300
committerGitHub <noreply@github.com>2025-07-08 12:58:34 +0200
commite476f968bc8e438a0435d10934f148de570db8eb (patch)
treec0e0f02a69351a3c6a5981a12952dec4b8bf807c /libcxx/test/std/utilities/function.objects
parenta73daf4ade64d822ceee39eb572e6f0fb1b5e907 (diff)
downloadllvm-e476f968bc8e438a0435d10934f148de570db8eb.zip
llvm-e476f968bc8e438a0435d10934f148de570db8eb.tar.gz
llvm-e476f968bc8e438a0435d10934f148de570db8eb.tar.bz2
[libc++][Clang] Added explanation why is_constructible evaluated to false. Updated the diagnostics checks in libc++ tests. (#144220)
Added explanation why a is constructible evaluated to false. Also fixed problem with ExtractTypeTraitFromExpression. In case std::is_xxx_v<> with variadic pack it tries to get template argument, but fails in expression Arg.getAsType() due to Arg.getKind() == TemplateArgument::ArgKind::Pack, but not TemplateArgument::ArgKind::Type. Reverts #144127 Fixies https://github.com/llvm/llvm-project/pull/143309#issuecomment-2970012054
Diffstat (limited to 'libcxx/test/std/utilities/function.objects')
-rw-r--r--libcxx/test/std/utilities/function.objects/func.bind.partial/bind_back.verify.cpp2
-rw-r--r--libcxx/test/std/utilities/function.objects/func.bind_front/bind_front.verify.cpp1
2 files changed, 3 insertions, 0 deletions
diff --git a/libcxx/test/std/utilities/function.objects/func.bind.partial/bind_back.verify.cpp b/libcxx/test/std/utilities/function.objects/func.bind.partial/bind_back.verify.cpp
index eb100c1..6a63b65 100644
--- a/libcxx/test/std/utilities/function.objects/func.bind.partial/bind_back.verify.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.bind.partial/bind_back.verify.cpp
@@ -69,6 +69,8 @@ void test() {
auto f = std::bind_back([](const Arg&) {}, x);
// expected-error-re@*:* {{static assertion failed{{.*}}bind_back requires all decay_t<Args> to be constructible from respective Args}}
// expected-error@*:* {{no matching constructor for initialization}}
+ // expected-error@*:* 0-1{{call to deleted constructor of 'F'}}
+ // expected-error@*:* 0-1{{call to deleted constructor of 'Arg'}}
}
{ // Mandates: (is_move_constructible_v<decay_t<Args>> && ...)
diff --git a/libcxx/test/std/utilities/function.objects/func.bind_front/bind_front.verify.cpp b/libcxx/test/std/utilities/function.objects/func.bind_front/bind_front.verify.cpp
index 5100259..27a1fba 100644
--- a/libcxx/test/std/utilities/function.objects/func.bind_front/bind_front.verify.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.bind_front/bind_front.verify.cpp
@@ -42,4 +42,5 @@ void f() {
auto d = std::bind_front(do_nothing, n); // expected-error {{no matching function for call to 'bind_front'}}
auto t = std::bind_front(testNotMoveConst, NotMoveConst(0)); // expected-error {{no matching function for call to 'bind_front'}}
+ // expected-error@*:* 0-1{{call to deleted constructor of 'NotMoveConst'}}
}