Update clang-tidy. (#10730)
- Install cmake using pip. - Fix compile command generation. - Clean up the tidy script and remove the need to load the yaml file. - Fix modernized type traits. - Fix span class. Polymorphism support is dropped
This commit is contained in:
@@ -62,7 +62,7 @@ void TestPartitioner(bst_target_t n_targets) {
|
||||
auto ptr = gmat.cut.Ptrs()[split_ind + 1];
|
||||
float split_value = gmat.cut.Values().at(ptr / 2);
|
||||
RegTree tree{n_targets, n_features};
|
||||
if constexpr (std::is_same<ExpandEntry, CPUExpandEntry>::value) {
|
||||
if constexpr (std::is_same_v<ExpandEntry, CPUExpandEntry>) {
|
||||
GetSplit(&tree, split_value, &candidates);
|
||||
} else {
|
||||
GetMultiSplitForTest(&tree, split_value, &candidates);
|
||||
@@ -119,7 +119,7 @@ void VerifyColumnSplitPartitioner(bst_target_t n_targets, size_t n_samples,
|
||||
{
|
||||
RegTree tree{n_targets, n_features};
|
||||
CommonRowPartitioner partitioner{&ctx, n_samples, base_rowid, true};
|
||||
if constexpr (std::is_same<ExpandEntry, CPUExpandEntry>::value) {
|
||||
if constexpr (std::is_same_v<ExpandEntry, CPUExpandEntry>) {
|
||||
GetSplit(&tree, min_value, &candidates);
|
||||
} else {
|
||||
GetMultiSplitForTest(&tree, min_value, &candidates);
|
||||
@@ -132,7 +132,7 @@ void VerifyColumnSplitPartitioner(bst_target_t n_targets, size_t n_samples,
|
||||
{
|
||||
RegTree tree{n_targets, n_features};
|
||||
CommonRowPartitioner partitioner{&ctx, n_samples, base_rowid, true};
|
||||
if constexpr (std::is_same<ExpandEntry, CPUExpandEntry>::value) {
|
||||
if constexpr (std::is_same_v<ExpandEntry, CPUExpandEntry>) {
|
||||
GetSplit(&tree, mid_value, &candidates);
|
||||
} else {
|
||||
GetMultiSplitForTest(&tree, mid_value, &candidates);
|
||||
@@ -187,7 +187,7 @@ void TestColumnSplitPartitioner(bst_target_t n_targets) {
|
||||
auto ptr = gmat.cut.Ptrs()[split_ind + 1];
|
||||
mid_value = gmat.cut.Values().at(ptr / 2);
|
||||
RegTree tree{n_targets, n_features};
|
||||
if constexpr (std::is_same<ExpandEntry, CPUExpandEntry>::value) {
|
||||
if constexpr (std::is_same_v<ExpandEntry, CPUExpandEntry>) {
|
||||
GetSplit(&tree, mid_value, &candidates);
|
||||
} else {
|
||||
GetMultiSplitForTest(&tree, mid_value, &candidates);
|
||||
|
||||
Reference in New Issue
Block a user