diff --git a/src/sequence_diagram/visitor/translation_unit_visitor.cc b/src/sequence_diagram/visitor/translation_unit_visitor.cc index dae80f38..7845a810 100644 --- a/src/sequence_diagram/visitor/translation_unit_visitor.cc +++ b/src/sequence_diagram/visitor/translation_unit_visitor.cc @@ -518,7 +518,8 @@ bool translation_unit_visitor::TraverseLambdaExpr(clang::LambdaExpr *expr) bool translation_unit_visitor::TraverseCallExpr(clang::CallExpr *expr) { - if (source_manager().isInSystemHeader(expr->getSourceRange().getBegin())) + if (!config().include_system_headers() && + source_manager().isInSystemHeader(expr->getSourceRange().getBegin())) return true; LOG_TRACE("Entering call expression at {}", @@ -541,7 +542,8 @@ bool translation_unit_visitor::TraverseCallExpr(clang::CallExpr *expr) bool translation_unit_visitor::TraverseCUDAKernelCallExpr( clang::CUDAKernelCallExpr *expr) { - if (source_manager().isInSystemHeader(expr->getSourceRange().getBegin())) + if (!config().include_system_headers() && + source_manager().isInSystemHeader(expr->getSourceRange().getBegin())) return true; LOG_TRACE("Entering CUDA kernel call expression at {}", @@ -564,7 +566,8 @@ bool translation_unit_visitor::TraverseCUDAKernelCallExpr( bool translation_unit_visitor::TraverseCXXMemberCallExpr( clang::CXXMemberCallExpr *expr) { - if (source_manager().isInSystemHeader(expr->getSourceRange().getBegin())) + if (!config().include_system_headers() && + source_manager().isInSystemHeader(expr->getSourceRange().getBegin())) return true; LOG_TRACE("Entering member call expression at {}", diff --git a/tests/t20002/t20002.cc b/tests/t20002/t20002.cc index 9888c599..e225f605 100644 --- a/tests/t20002/t20002.cc +++ b/tests/t20002/t20002.cc @@ -1,7 +1,3 @@ -#include -#include -#include - namespace clanguml { namespace t20002 { diff --git a/tests/t20055/.clang-uml b/tests/t20055/.clang-uml index a31a348d..a83d995f 100644 --- a/tests/t20055/.clang-uml +++ b/tests/t20055/.clang-uml @@ -10,6 +10,7 @@ diagrams: - clanguml::t20055::ns2 elements: - clanguml::t20055::ns1::B + - clanguml::t20055::ns1::d() using_namespace: clanguml::t20055 from: - function: "clanguml::t20055::ns2::tmain()" \ No newline at end of file diff --git a/tests/t20055/t20055.cc b/tests/t20055/t20055.cc index f30432bd..3ff58cee 100644 --- a/tests/t20055/t20055.cc +++ b/tests/t20055/t20055.cc @@ -2,13 +2,19 @@ namespace clanguml { namespace t20055 { namespace ns1 { +void d() { } + struct A { void a() { } }; struct B { A a; - void b() { a.a(); } + void b() + { + a.a(); + d(); + } }; } // namespace ns1 diff --git a/tests/t20055/test_case.h b/tests/t20055/test_case.h index e89a53c6..36807d3f 100644 --- a/tests/t20055/test_case.h +++ b/tests/t20055/test_case.h @@ -30,6 +30,7 @@ TEST_CASE("t20055") // {{"ns2", "tmain()"}, {"ns2", "C"}, "c()"}, {{"ns2", "C"}, {"ns1", "B"}, "b()"}, + {{"ns1", "B"}, {"ns1", "d()"}, ""}, {{"ns2", "C"}, {"ns2", "f()"}, ""} // }));