Skip to content

Commit

Permalink
Fixed clang-tidy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bkryza committed Nov 4, 2024
1 parent a99b684 commit 2379b1c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/common/model/nested_trait.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ template <typename T, typename Path> class nested_trait {
*/
bool has_element(const std::string &name) const
{
return elements_by_name_.count(name);
return elements_by_name_.count(name) != 0U;
}

std::set<std::pair<eid_t, std::string>> added_elements_;
Expand Down
6 changes: 3 additions & 3 deletions src/common/visitor/translation_unit_visitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,13 @@ template <typename ConfigT, typename DiagramT> class translation_unit_visitor {
auto should_include_namespace = diagram().should_include(
common::model::namespace_{decl->getQualifiedNameAsString()});

auto decl_file = decl->getLocation().printToString(source_manager());
const auto decl_file =
decl->getLocation().printToString(source_manager());

std::string file_path;
unsigned line{};
unsigned column{};
decl_file =
common::parse_source_location(decl_file, file_path, line, column);
common::parse_source_location(decl_file, file_path, line, column);

const auto should_include_decl_file =
diagram().should_include(common::model::source_file{file_path});
Expand Down
2 changes: 1 addition & 1 deletion src/include_diagram/visitor/translation_unit_visitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void translation_unit_visitor::include_visitor::InclusionDirective(
clang::SourceLocation hash_loc, const clang::Token & /*include_tok*/,
clang::StringRef /*file_name*/, bool is_angled,
clang::CharSourceRange /*filename_range*/, clang::OptionalFileEntryRef file,
clang::StringRef SearchPath, clang::StringRef relative_path,
clang::StringRef /*search_path*/, clang::StringRef relative_path,
const clang::Module * /* suggested_module */, bool /*imported*/,
clang::SrcMgr::CharacteristicKind file_type)
#elif LLVM_VERSION_MAJOR >= 16
Expand Down

0 comments on commit 2379b1c

Please sign in to comment.