Skip to content

Commit de79423

Browse files
authored
Merge pull request #1970 from romintomasetti/warnings
cicd: enable `-Wall -Wextra -Werror` for clang
2 parents 9a7dba4 + 1c724a8 commit de79423

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

include/stdexec/__detail/__read_env.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ namespace STDEXEC
5757
}
5858

5959
_Receiver __rcvr_;
60-
__optional<_Ty> __result_;
60+
__optional<_Ty> __result_ = __nullopt;
6161
};
6262

6363
template <class _Receiver, class _Query, class _Ty>

test/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
# limitations under the License.
1515
#=============================================================================
1616

17+
function(add_compile_diagnostics TARGET)
18+
if(CMAKE_CXX_COMPILER_ID STREQUAL Clang OR CMAKE_CXX_COMPILER_ID STREQUAL GNU)
19+
target_compile_options(${TARGET} PRIVATE -Wall -Wextra -Wpedantic -Werror)
20+
endif()
21+
endfunction()
22+
1723
set(stdexec_test_sources
1824
test_main.cpp
1925
stdexec/cpos/test_cpo_bulk.cpp
@@ -97,6 +103,7 @@ target_link_libraries(common_test_settings INTERFACE $<TARGET_NAME_IF_EXISTS:TBB
97103
# $<$<NOT:$<AND:$<CXX_COMPILER_ID:NVHPC>,$<COMPILE_LANGUAGE:CXX>>>:STDEXEC_ENABLE_EXTRA_TYPE_CHECKING>)
98104

99105
add_executable(test.stdexec ${stdexec_test_sources})
106+
add_compile_diagnostics(test.stdexec)
100107
target_link_libraries(test.stdexec
101108
PUBLIC
102109
STDEXEC::stdexec
@@ -109,6 +116,7 @@ if(STDEXEC_BUILD_PARALLEL_SCHEDULER)
109116
add_executable(test.parallel_scheduler_replacement
110117
test_main.cpp
111118
stdexec/schedulers/test_parallel_scheduler_replacement.cpp)
119+
add_compile_diagnostics(test.parallel_scheduler_replacement)
112120
target_link_libraries(test.parallel_scheduler_replacement
113121
PUBLIC
114122
STDEXEC::stdexec
@@ -120,6 +128,7 @@ if(STDEXEC_BUILD_PARALLEL_SCHEDULER)
120128
endif()
121129

122130
add_executable(test.scratch test_main.cpp test_scratch.cpp)
131+
add_compile_diagnostics(test.scratch)
123132
target_link_libraries(test.scratch
124133
PUBLIC
125134
STDEXEC::stdexec

test/exec/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ set_source_files_properties(test_any_sender.cpp
6868
COMPILE_FLAGS $<$<CXX_COMPILER_ID:MSVC>:/bigobj>)
6969

7070
add_executable(test.exec ${exec_test_sources})
71+
add_compile_diagnostics(test.exec)
7172
target_link_libraries(test.exec
7273
PUBLIC
7374
STDEXEC::stdexec

test/test_common/scope_helpers.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ namespace
5656
-> ex::completion_signatures_of_t<ex::__child_of<std::remove_cvref_t<Sender>>, Env...>
5757
{
5858
return {};
59-
};
59+
}
6060
};
6161

6262
struct counting_resource : std::pmr::memory_resource

0 commit comments

Comments
 (0)