Skip to content

Commit 28dba23

Browse files
committed
Tell lcov to ignore std::is_constant_evaluated
1 parent 56d1bf4 commit 28dba23

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

include/flux/core/numeric.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ struct checked_add_fn {
301301
// constant evaluation already checks for overflow
302302
if (signed_integral<T> && (sizeof(T) >= sizeof(int)) &&
303303
std::is_constant_evaluated()) {
304-
return unchecked_add_fn{}(lhs, rhs);
304+
return unchecked_add_fn{}(lhs, rhs); // LCOV_EXCL_LINE
305305
} else {
306306
auto result = overflowing_add_fn{}(lhs, rhs);
307307
if (result.overflowed) {
@@ -321,7 +321,7 @@ struct checked_sub_fn {
321321
{
322322
if (signed_integral<T> && (sizeof(T) >= sizeof(int)) &&
323323
std::is_constant_evaluated()) {
324-
return unchecked_sub_fn{}(lhs, rhs);
324+
return unchecked_sub_fn{}(lhs, rhs); // LCOV_EXCL_LINE
325325
} else {
326326
auto result = overflowing_sub_fn{}(lhs, rhs);
327327
if (result.overflowed) {
@@ -341,7 +341,7 @@ struct checked_mul_fn {
341341
{
342342
if (signed_integral<T> && (sizeof(T) >= sizeof(int)) &&
343343
std::is_constant_evaluated()) {
344-
return unchecked_mul_fn{}(lhs, rhs);
344+
return unchecked_mul_fn{}(lhs, rhs); // LCOV_EXCL_LINE
345345
} else {
346346
auto result = overflowing_mul_fn{}(lhs, rhs);
347347
if (result.overflowed) {

include/flux/op/compare.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ struct compare_fn {
5959

6060
if constexpr (can_memcmp) {
6161
if (std::is_constant_evaluated()) {
62-
return impl(seq1, seq2, cmp);
62+
return impl(seq1, seq2, cmp); // LCOV_EXCL_LINE
6363
} else {
6464
auto const seq1_size = flux::usize(seq1);
6565
auto const seq2_size = flux::usize(seq2);

include/flux/op/equal.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ struct equal_fn {
5555

5656
if constexpr (can_memcmp) {
5757
if (std::is_constant_evaluated()) {
58-
return impl(seq1, seq2, cmp);
58+
return impl(seq1, seq2, cmp); // LCOV_EXCL_LINE
5959
} else {
6060
auto size = flux::usize(seq1);
6161
if(size == 0) {

include/flux/op/fill.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct fill_fn {
3535

3636
if constexpr (can_memset) {
3737
if (std::is_constant_evaluated()) {
38-
impl(seq, value);
38+
impl(seq, value); // LCOV_EXCL_LINE
3939
} else {
4040
auto size = flux::usize(seq);
4141
if(size == 0) {

include/flux/op/find.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ struct find_fn {
3838

3939
if constexpr (can_memchr) {
4040
if (std::is_constant_evaluated()) {
41-
return impl(seq, value);
41+
return impl(seq, value); // LCOV_EXCL_LINE
4242
} else {
4343
auto size = flux::usize(seq);
4444
if (size == 0) {

include/flux/op/flatten_with.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ inline constexpr auto variant_emplace =
2323
variant.template emplace<N>(FLUX_FWD(args)...);
2424
} else {
2525
if (std::is_constant_evaluated()) {
26-
variant = std::variant<Types...>(std::in_place_index<N>, FLUX_FWD(args)...);
26+
variant = std::variant<Types...>(std::in_place_index<N>, FLUX_FWD(args)...); // LCOV_EXCL_LINE
2727
} else {
2828
variant.template emplace<N>(FLUX_FWD(args)...);
2929
}

include/flux/op/output_to.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ struct output_to_fn {
4040

4141
if constexpr (can_memcpy) {
4242
if (std::is_constant_evaluated()) {
43-
return impl(seq, iter);
43+
return impl(seq, iter); // LCOV_EXCL_LINE
4444
} else {
4545
auto size = flux::usize(seq);
4646
if (size == 0) {

0 commit comments

Comments
 (0)