aboutsummaryrefslogtreecommitdiff
path: root/libcxx
diff options
context:
space:
mode:
authorCasey Carter <Casey@Carter.net>2022-06-24 09:06:39 -0700
committerCasey Carter <Casey@Carter.net>2022-06-24 09:06:47 -0700
commitd3cbcc4e8990ffe6d1e2a7708ce30220b95ce025 (patch)
tree7e4268d83108539f36264064ae398923be21de53 /libcxx
parent300f8da8e8682cbd881f1874801f59ed804e3560 (diff)
downloadllvm-d3cbcc4e8990ffe6d1e2a7708ce30220b95ce025.zip
llvm-d3cbcc4e8990ffe6d1e2a7708ce30220b95ce025.tar.gz
llvm-d3cbcc4e8990ffe6d1e2a7708ce30220b95ce025.tar.bz2
[libcxx][test] barrier completion functions must be non-throwing
... per N4910 [thread.barrier.class]/5.
Diffstat (limited to 'libcxx')
-rw-r--r--libcxx/test/std/thread/thread.barrier/completion.pass.cpp2
-rw-r--r--libcxx/test/std/thread/thread.barrier/max.pass.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/test/std/thread/thread.barrier/completion.pass.cpp b/libcxx/test/std/thread/thread.barrier/completion.pass.cpp
index d976080..7cc7ce95 100644
--- a/libcxx/test/std/thread/thread.barrier/completion.pass.cpp
+++ b/libcxx/test/std/thread/thread.barrier/completion.pass.cpp
@@ -24,7 +24,7 @@
int main(int, char**)
{
int x = 0;
- auto comp = [&]() { x += 1; };
+ auto comp = [&]() noexcept { x += 1; };
std::barrier<decltype(comp)> b(2, comp);
std::thread t = support::make_test_thread([&](){
diff --git a/libcxx/test/std/thread/thread.barrier/max.pass.cpp b/libcxx/test/std/thread/thread.barrier/max.pass.cpp
index 0060e31..ec03c5c 100644
--- a/libcxx/test/std/thread/thread.barrier/max.pass.cpp
+++ b/libcxx/test/std/thread/thread.barrier/max.pass.cpp
@@ -20,7 +20,7 @@
int main(int, char**)
{
static_assert(std::barrier<>::max() > 0, "");
- auto l = [](){};
+ auto l = []() noexcept {};
static_assert(std::barrier<decltype(l)>::max() > 0, "");
return 0;
}