Fixed formatting
This commit is contained in:
@@ -171,10 +171,9 @@ bool translation_unit_visitor::VisitEnumDecl(clang::EnumDecl *enm)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!id_opt) {
|
if (!id_opt) {
|
||||||
LOG_WARN("Unknown parent for enum {}", qualified_name);
|
LOG_WARN("Unknown parent for enum {}", qualified_name);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
auto parent_class = diagram_.get_class(*id_opt);
|
auto parent_class = diagram_.get_class(*id_opt);
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ void call_expression_context::enter_lambda_expression(std::int64_t id)
|
|||||||
|
|
||||||
void call_expression_context::leave_lambda_expression()
|
void call_expression_context::leave_lambda_expression()
|
||||||
{
|
{
|
||||||
if(current_lambda_caller_id_.empty())
|
if (current_lambda_caller_id_.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
LOG_DBG("Leaving current lambda expression id to {}",
|
LOG_DBG("Leaving current lambda expression id to {}",
|
||||||
|
|||||||
@@ -64,8 +64,6 @@ public:
|
|||||||
bool VisitFunctionTemplateDecl(
|
bool VisitFunctionTemplateDecl(
|
||||||
clang::FunctionTemplateDecl *function_declaration);
|
clang::FunctionTemplateDecl *function_declaration);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
clanguml::sequence_diagram::model::diagram &diagram();
|
clanguml::sequence_diagram::model::diagram &diagram();
|
||||||
|
|
||||||
const clanguml::sequence_diagram::model::diagram &diagram() const;
|
const clanguml::sequence_diagram::model::diagram &diagram() const;
|
||||||
@@ -206,8 +204,7 @@ private:
|
|||||||
bool is_smart_pointer(const clang::TemplateDecl *primary_template) const;
|
bool is_smart_pointer(const clang::TemplateDecl *primary_template) const;
|
||||||
|
|
||||||
bool is_callee_valid_template_specialization(
|
bool is_callee_valid_template_specialization(
|
||||||
const clang::CXXDependentScopeMemberExpr *dependent_member_expr)
|
const clang::CXXDependentScopeMemberExpr *dependent_member_expr) const;
|
||||||
const;
|
|
||||||
|
|
||||||
bool process_operator_call_expression(model::message &m,
|
bool process_operator_call_expression(model::message &m,
|
||||||
const clang::CXXOperatorCallExpr *operator_call_expr);
|
const clang::CXXOperatorCallExpr *operator_call_expr);
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ TEST_CASE("t20001", "[test-case][sequence]")
|
|||||||
|
|
||||||
REQUIRE_THAT(puml, HasCall(_A("A"), "log_result(int)"));
|
REQUIRE_THAT(puml, HasCall(_A("A"), "log_result(int)"));
|
||||||
REQUIRE_THAT(puml, HasCall(_A("B"), _A("A"), "log_result(int)"));
|
REQUIRE_THAT(puml, HasCall(_A("B"), _A("A"), "log_result(int)"));
|
||||||
REQUIRE_THAT(puml, HasCallWithResponse(_A("B"), _A("A"), "add3(int,int,int)"));
|
REQUIRE_THAT(
|
||||||
|
puml, HasCallWithResponse(_A("B"), _A("A"), "add3(int,int,int)"));
|
||||||
REQUIRE_THAT(puml, HasCall(_A("A"), "add(int,int)"));
|
REQUIRE_THAT(puml, HasCall(_A("A"), "add(int,int)"));
|
||||||
REQUIRE_THAT(puml, !HasCall(_A("A"), _A("detail::C"), "add(int,int)"));
|
REQUIRE_THAT(puml, !HasCall(_A("A"), _A("detail::C"), "add(int,int)"));
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ TEST_CASE("t20012", "[test-case][sequence]")
|
|||||||
|
|
||||||
REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("D"), "add5(int)"));
|
REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("D"), "add5(int)"));
|
||||||
|
|
||||||
|
|
||||||
save_puml(
|
save_puml(
|
||||||
"./" + config.output_directory() + "/" + diagram->name + ".puml", puml);
|
"./" + config.output_directory() + "/" + diagram->name + ".puml", puml);
|
||||||
}
|
}
|
||||||
@@ -4,13 +4,9 @@ namespace clanguml {
|
|||||||
namespace t20014 {
|
namespace t20014 {
|
||||||
|
|
||||||
template <typename T, typename F> struct C {
|
template <typename T, typename F> struct C {
|
||||||
F c1(F i, F j) {
|
F c1(F i, F j) { return c_.b1(i, j); }
|
||||||
return c_.b1(i, j);
|
|
||||||
}
|
|
||||||
|
|
||||||
F c2(F i, F j){
|
F c2(F i, F j) { return c_.b2(i, j); }
|
||||||
return c_.b2(i, j);
|
|
||||||
}
|
|
||||||
|
|
||||||
T c_;
|
T c_;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ TEST_CASE("t20014", "[test-case][sequence]")
|
|||||||
|
|
||||||
REQUIRE_THAT(puml, StartsWith("@startuml"));
|
REQUIRE_THAT(puml, StartsWith("@startuml"));
|
||||||
REQUIRE_THAT(puml, EndsWith("@enduml\n"));
|
REQUIRE_THAT(puml, EndsWith("@enduml\n"));
|
||||||
|
|
||||||
// Check if all calls exist
|
// Check if all calls exist
|
||||||
REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("B"), "b1(int,int)"));
|
REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("B"), "b1(int,int)"));
|
||||||
REQUIRE_THAT(puml, HasCall(_A("B"), _A("A"), "a1(int,int)"));
|
REQUIRE_THAT(puml, HasCall(_A("B"), _A("A"), "a1(int,int)"));
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ namespace clanguml {
|
|||||||
namespace t20016 {
|
namespace t20016 {
|
||||||
struct A {
|
struct A {
|
||||||
void a1(int a) { }
|
void a1(int a) { }
|
||||||
template <typename T> T a2(const T &a) { return a;}
|
template <typename T> T a2(const T &a) { return a; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T> struct B {
|
template <typename T> struct B {
|
||||||
@@ -13,7 +13,8 @@ template <typename T> struct B {
|
|||||||
A a_;
|
A a_;
|
||||||
};
|
};
|
||||||
|
|
||||||
void tmain() {
|
void tmain()
|
||||||
|
{
|
||||||
B<long> b;
|
B<long> b;
|
||||||
|
|
||||||
b.b1(1);
|
b.b1(1);
|
||||||
|
|||||||
@@ -45,8 +45,7 @@ TEST_CASE("t20017", "[test-case][sequence]")
|
|||||||
REQUIRE_THAT(puml,
|
REQUIRE_THAT(puml,
|
||||||
HasCall(_A("t20017.cc"), _A("include/t20017_b.h"), "b1(int,int)"));
|
HasCall(_A("t20017.cc"), _A("include/t20017_b.h"), "b1(int,int)"));
|
||||||
REQUIRE_THAT(puml,
|
REQUIRE_THAT(puml,
|
||||||
HasCall(
|
HasCall(_A("t20017.cc"), _A("include/t20017_b.h"), "b2<int>(int,int)"));
|
||||||
_A("t20017.cc"), _A("include/t20017_b.h"), "b2<int>(int,int)"));
|
|
||||||
REQUIRE_THAT(puml, HasExitpoint(_A("t20017.cc")));
|
REQUIRE_THAT(puml, HasExitpoint(_A("t20017.cc")));
|
||||||
|
|
||||||
save_puml(
|
save_puml(
|
||||||
|
|||||||
@@ -79,19 +79,26 @@ template <typename T, typename... Ts> constexpr bool has_type() noexcept
|
|||||||
return (std::is_same_v<T, Ts> || ... || false);
|
return (std::is_same_v<T, Ts> || ... || false);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Public { };
|
struct Public {
|
||||||
|
};
|
||||||
|
|
||||||
struct Protected { };
|
struct Protected {
|
||||||
|
};
|
||||||
|
|
||||||
struct Private { };
|
struct Private {
|
||||||
|
};
|
||||||
|
|
||||||
struct Abstract { };
|
struct Abstract {
|
||||||
|
};
|
||||||
|
|
||||||
struct Static { };
|
struct Static {
|
||||||
|
};
|
||||||
|
|
||||||
struct Const { };
|
struct Const {
|
||||||
|
};
|
||||||
|
|
||||||
struct Default { };
|
struct Default {
|
||||||
|
};
|
||||||
|
|
||||||
struct HasCallWithResultMatcher : ContainsMatcher {
|
struct HasCallWithResultMatcher : ContainsMatcher {
|
||||||
HasCallWithResultMatcher(
|
HasCallWithResultMatcher(
|
||||||
|
|||||||
Reference in New Issue
Block a user