Skip to content

Commit

Permalink
Fix test suite issues discovered by Clang 15 (#3135)
Browse files Browse the repository at this point in the history
  • Loading branch information
CaseyCarter authored Oct 12, 2022
1 parent bbb07df commit 9de55f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/std/tests/P0898R3_concepts/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ namespace test_integral_concepts {
enum class is { not_integral, integral, signed_integral, unsigned_integral, ull };

template <class T>
constexpr is f(T&&) {
constexpr is f(T) {
return is::not_integral;
}
template <integral T>
Expand Down
4 changes: 1 addition & 3 deletions tests/tr1/include/tspec_random.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ class do_random_test { // template for running a random distribution test

// collect random sample data from given distribution
mt19937 gen;
i = 0;
int n = 0;
i = 0;
for (; i < BINSIZE; ++i)
got_count[i] = 0;

Expand All @@ -59,7 +58,6 @@ class do_random_test { // template for running a random distribution test
Ty zero = (Ty) 0; // to quiet diagnostics
if (zero <= rand_value && rand_value < (Ty) BINSIZE) { // increase the count of the proper bin
got_count[(int) rand_value]++;
++n;
} else if (rand_value < zero)
++under_bin;
else if ((Ty) (BINSIZE - 1) < rand_value)
Expand Down

0 comments on commit 9de55f1

Please sign in to comment.