Applying readability-simplify-boolean-expr clang-tidy fixes
This commit is contained in:
@@ -86,11 +86,9 @@ bool template_parameter::is_variadic() const noexcept { return is_variadic_; }
|
|||||||
bool template_parameter::is_specialization_of(
|
bool template_parameter::is_specialization_of(
|
||||||
const template_parameter &ct) const
|
const template_parameter &ct) const
|
||||||
{
|
{
|
||||||
if ((ct.is_template_parameter() || ct.is_template_template_parameter()) &&
|
return (ct.is_template_parameter() ||
|
||||||
!is_template_parameter())
|
ct.is_template_template_parameter()) &&
|
||||||
return true;
|
!is_template_parameter();
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void template_parameter::add_template_param(template_parameter &&ct)
|
void template_parameter::add_template_param(template_parameter &&ct)
|
||||||
|
|||||||
@@ -347,10 +347,7 @@ public:
|
|||||||
auto inc = tvl::all_of(inclusive_.begin(), inclusive_.end(),
|
auto inc = tvl::all_of(inclusive_.begin(), inclusive_.end(),
|
||||||
[this, &e](const auto &in) { return in->match(diagram_, e); });
|
[this, &e](const auto &in) { return in->match(diagram_, e); });
|
||||||
|
|
||||||
if (tvl::is_undefined(inc) || tvl::is_true(inc))
|
return static_cast<bool>(tvl::is_undefined(inc) || tvl::is_true(inc));
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ inline value_t all_of(InputIterator first, InputIterator last, Predicate pred)
|
|||||||
for (InputIterator it = first; it != last; it++) {
|
for (InputIterator it = first; it != last; it++) {
|
||||||
value_t m = pred(*it);
|
value_t m = pred(*it);
|
||||||
if (m.has_value()) {
|
if (m.has_value()) {
|
||||||
if (m.value() == true) {
|
if (m.value()) {
|
||||||
res = true;
|
res = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -59,7 +59,7 @@ inline value_t any_of(InputIterator first, InputIterator last, Predicate pred)
|
|||||||
for (InputIterator it = first; it != last; it++) {
|
for (InputIterator it = first; it != last; it++) {
|
||||||
value_t m = pred(*it);
|
value_t m = pred(*it);
|
||||||
if (m.has_value()) {
|
if (m.has_value()) {
|
||||||
if (m.value() == true) {
|
if (m.value()) {
|
||||||
res = true;
|
res = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2125,10 +2125,7 @@ bool translation_unit_visitor::should_include(const clang::CallExpr *expr) const
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
const auto expr_file = expr->getBeginLoc().printToString(source_manager());
|
const auto expr_file = expr->getBeginLoc().printToString(source_manager());
|
||||||
if (!diagram().should_include(common::model::source_file{expr_file}))
|
return diagram().should_include(common::model::source_file{expr_file});
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool translation_unit_visitor::should_include(
|
bool translation_unit_visitor::should_include(
|
||||||
|
|||||||
Reference in New Issue
Block a user