Applied readability-make-member-function-const clang-tidy fixes

This commit is contained in:
Bartek Kryza
2022-12-23 16:44:01 +01:00
parent 72bd69729e
commit fb2aeb6dea
6 changed files with 9 additions and 8 deletions

View File

@@ -2151,7 +2151,7 @@ void translation_unit_visitor::finalize()
}
bool translation_unit_visitor::simplify_system_template(
template_parameter &ct, const std::string &full_name)
template_parameter &ct, const std::string &full_name) const
{
if (config().type_aliases().count(full_name) > 0) {
ct.set_name(config().type_aliases().at(full_name));

View File

@@ -227,7 +227,7 @@ private:
void resolve_local_to_global_ids();
bool simplify_system_template(
model::template_parameter &ct, const std::string &full_name);
model::template_parameter &ct, const std::string &full_name) const;
/// Store the mapping from local clang entity id (obtained using
/// getID()) method to clang-uml global id

View File

@@ -57,7 +57,7 @@ bool call_expression_context::valid() const
(current_function_template_decl_ != nullptr);
}
clang::ASTContext *call_expression_context::get_ast_context()
clang::ASTContext *call_expression_context::get_ast_context() const
{
if (current_class_template_specialization_decl_ != nullptr)
return &current_class_template_specialization_decl_->getASTContext();

View File

@@ -37,7 +37,7 @@ struct call_expression_context {
bool valid() const;
clang::ASTContext *get_ast_context();
clang::ASTContext *get_ast_context() const;
void update(clang::CXXRecordDecl *cls);

View File

@@ -1142,7 +1142,7 @@ bool translation_unit_visitor::process_function_call_expression(
}
bool translation_unit_visitor::process_unresolved_lookup_call_expression(
model::message &m, const clang::CallExpr *expr)
model::message &m, const clang::CallExpr *expr) const
{
// This is probably a template
const auto *unresolved_expr =
@@ -2008,7 +2008,8 @@ void translation_unit_visitor::
}
bool translation_unit_visitor::simplify_system_template(
class_diagram::model::template_parameter &ct, const std::string &full_name)
class_diagram::model::template_parameter &ct,
const std::string &full_name) const
{
if (config().type_aliases().count(full_name) > 0) {
ct.set_name(config().type_aliases().at(full_name));

View File

@@ -234,7 +234,7 @@ private:
model::class_ *parent);
bool simplify_system_template(class_diagram::model::template_parameter &ct,
const std::string &full_name);
const std::string &full_name) const;
std::string simplify_system_template(const std::string &full_name) const;
@@ -258,7 +258,7 @@ private:
model::message &m, const clang::CallExpr *expr);
bool process_unresolved_lookup_call_expression(
model::message &m, const clang::CallExpr *expr);
model::message &m, const clang::CallExpr *expr) const;
void push_message(clang::CallExpr *expr, model::message &&m);