Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make clang-tidy plugin test suite compatible with libc++ #71426

Merged
merged 1 commit into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/clang-tidy-plugin/test/assert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <assert.h>
#include <stdlib.h>

#include <cstdlib>
#include <cata_assert.h>

void f0()
Expand Down
4 changes: 2 additions & 2 deletions tools/clang-tidy-plugin/test/determinism.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ int rand();
void f()
{
std::mt19937 gen0;
// CHECK-MESSAGES: [[@LINE-1]]:18: warning: Construction of library random engine 'std::mt19937' (aka 'mersenne_twister_engine<unsigned {{(int|long)}}, 32, 624, 397, 31, 2567483615UL, 11, 4294967295UL, 7, 2636928640UL, 15, 4022730752UL, 18, 1812433253UL>'). To ensure determinism for a fixed seed, use the common tools from rng.h rather than your own random number engines. [cata-determinism]
// CHECK-MESSAGES: [[@LINE-1]]:18: warning: Construction of library random engine 'std::mt19937' (aka 'mersenne_twister_engine<unsigned {{(int|long)}}, 32, 624, 397, 31, 2567483615{{(U|UL)}}, 11, 4294967295{{(U|UL)}}, 7, 2636928640{{(U|UL)}}, 15, 4022730752{{(U|UL)}}, 18, 1812433253{{(UL)?}}>'). To ensure determinism for a fixed seed, use the common tools from rng.h rather than your own random number engines. [cata-determinism]
cata_default_random_engine gen1( 0 );
// CHECK-MESSAGES: [[@LINE-1]]:32: warning: Construction of library random engine 'cata_default_random_engine' (aka 'linear_congruential_engine<unsigned {{(int|long)}}, 16807UL, 0UL, 2147483647UL>'). To ensure determinism for a fixed seed, use the common tools from rng.h rather than your own random number engines. [cata-determinism]
// CHECK-MESSAGES: [[@LINE-1]]:32: warning: Construction of library random engine 'cata_default_random_engine' (aka 'linear_congruential_engine<unsigned {{(int|long)}}, 16807{{(UL)?}}, 0{{(UL)?}}, 2147483647{{(UL)?}}>'). To ensure determinism for a fixed seed, use the common tools from rng.h rather than your own random number engines. [cata-determinism]
SomeOtherStruct s0;
StructWithSeedButNotResultType s1;
SomeOtherAlias a;
Expand Down
2 changes: 1 addition & 1 deletion tools/clang-tidy-plugin/test/use-localized-sorting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void sort1( NonString *start, NonString *end )
void sortit0( std::vector<std::string>::iterator start, std::vector<std::string>::iterator end )
{
std::sort( start, end );
// CHECK-MESSAGES: warning: Raw sort of 'typename __traits_type::value_type' (aka 'std::basic_string<char>'). For UI purposes please use localized_compare from translations.h. [cata-use-localized-sorting]
// CHECK-MESSAGES: warning: Raw sort of 'typename {{.*}}' (aka 'std::{{.*string.*}}'). For UI purposes please use localized_compare from translations.h. [cata-use-localized-sorting]
}

void sortit1( std::vector<NonString>::iterator start, std::vector<NonString>::iterator end )
Expand Down
Loading