Applied clang-analyzer-core.* fixes
This commit is contained in:
@@ -367,7 +367,7 @@ void generator::generate(std::ostream &ostr) const
|
||||
|
||||
for (const auto &sf : m_config.start_from()) {
|
||||
if (sf.location_type == source_location::location_t::function) {
|
||||
common::model::diagram_element::id_t start_from;
|
||||
common::model::diagram_element::id_t start_from{0};
|
||||
for (const auto &[k, v] : m_model.sequences()) {
|
||||
const auto &caller = *m_model.participants().at(v.from());
|
||||
std::string vfrom = caller.full_name(false);
|
||||
@@ -378,6 +378,13 @@ void generator::generate(std::ostream &ostr) const
|
||||
}
|
||||
}
|
||||
|
||||
if (start_from == 0) {
|
||||
LOG_WARN("Failed to find participant with {} for start_from "
|
||||
"condition",
|
||||
sf.location);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Use this to break out of recurrent loops
|
||||
std::vector<common::model::diagram_element::id_t>
|
||||
visited_participants;
|
||||
|
||||
@@ -538,6 +538,9 @@ bool translation_unit_visitor::TraverseCompoundStmt(clang::CompoundStmt *stmt)
|
||||
using clanguml::sequence_diagram::model::activity;
|
||||
using clanguml::sequence_diagram::model::message;
|
||||
|
||||
if (stmt == nullptr)
|
||||
return true;
|
||||
|
||||
const auto *current_ifstmt = context().current_ifstmt();
|
||||
const auto *current_elseifstmt = context().current_elseifstmt();
|
||||
|
||||
@@ -1943,6 +1946,9 @@ translation_unit_visitor::build_template_instantiation(
|
||||
for (const auto &[id, c] : diagram().participants()) {
|
||||
const auto *participant_as_class =
|
||||
dynamic_cast<model::class_ *>(c.get());
|
||||
if (participant_as_class == nullptr)
|
||||
continue;
|
||||
|
||||
if ((participant_as_class != nullptr) &&
|
||||
(*participant_as_class == template_instantiation))
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user