Giter Club home page Giter Club logo

Comments (20)

bkryza avatar bkryza commented on June 13, 2024 1

@meastp I'm glad you were able to get it working :-)

As to the custom smart pointers, I have todo for this to add this to config file, for now if you don't mind modifying the source yourself you can extend the if-else block here

with sth like (assuming myptr::clone_ptr is a template type smart pointer?):

    if (tr_unaliased_declaration.find("std::shared_ptr") == 0) {
        nested_relationship_hint = relationship_t::kAssociation;
    }
    else if (tr_unaliased_declaration.find("std::weak_ptr") == 0) {
        nested_relationship_hint = relationship_t::kAssociation;
    }
    else if (tr_unaliased_declaration.find("myptr::clone_ptr") == 0) {
        nested_relationship_hint = relationship_t::kAggregation; // or relationship_t::kComposition
    }

Btw please don't close the issue - I have 1 or 2 more edge cases related to the root namespace references I want to test and then I'll close it when merging to master...

from clang-uml.

bkryza avatar bkryza commented on June 13, 2024

@meastp Thanks for the issue - I'll try to reproduce it and a test case for it to fix it...

Is MyPos just a regular class, or maybe a template or an alias to class or a class template?

from clang-uml.

meastp avatar meastp commented on June 13, 2024

@bkryza Just a regular class :)

from clang-uml.

meastp avatar meastp commented on June 13, 2024

@bkryza also, I've built clang-uml from source (using clang-14 and ubuntu 22.04 because my source use some c++17 features), so I can test the fix when you have one :)

from clang-uml.

meastp avatar meastp commented on June 13, 2024

here is a complete testcase:

.clang-uml
CMakeLists.txt
Position.h
Position.cpp

.clang-uml:

compilation_database_dir: build
output_directory: puml
diagrams:
  myproject_class:
    type: class
    glob:
      - Position.h
      - Position.cpp
    exclude:
        namespaces:
          - std

CMakeLists.txt:

cmake_minimum_required(VERSION 3.11)
project(qms VERSION 1.0.0 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

add_library(MyProj SHARED)

target_compile_features(MyProj PRIVATE cxx_std_17)

target_include_directories(MyProj PRIVATE ${CMAKE_CURRENT_LIST_DIR}/src)

target_include_directories(MyProj PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include)

target_sources(MyProj 
    PRIVATE
${CMAKE_CURRENT_LIST_DIR}/Position.h
${CMAKE_CURRENT_LIST_DIR}/Position.cpp
)

Position.h

#pragma once

class Position
{

  public:
	Position();

	Position &operator=(const Position &position) = default;

	Position(double x, double y) : x_(x), y_(y) {}

	virtual ~Position() = default;

  private:
	double x_ = 0;
	double y_ = 0;
};

class Position2D : public Position
{

  public:
	using Position::Position;

	Position2D(const Position2D &obj) = default;

	Position2D &operator=(const Position2D &position2D) = default;

	virtual ~Position2D() = default;
};

class Position3D : public Position
{

  public:
	using Position::Position;

	Position3D(const Position3D &obj) = default;

	Position3D &operator=(const Position3D &position3D) = default;

	Position3D(double x, double y, double z) : Position(x,y), z_(z) {}

	virtual ~Position3D() = default;

  private:
	double z_ = 0;
};

Position.cpp

#include "Position.h"

Position::Position() = default;

cmd:
export CC=/usr/bin/clang-14; export CXX=/usr/bin/clang++-14; mkdir build; cd build; cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE ../../test/; cmake --build .; cd ..; clang-uml -v

output:

most interesting lines at the end:

[debug] [tid 655] [class_diagram_generator.cc:326] === Skipping inheritance relation from ::QdiPosition to QdiPosition2D due to: Missing alias for ::QdiPosition
[debug] [tid 655] [diagram.cc:199] Looking for alias for ::QdiPosition
[debug] [tid 655] [class_diagram_generator.cc:326] === Skipping inheritance relation from ::QdiPosition to QdiPosition3D due to: Missing alias for ::QdiPosition

-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/c/Users/mattar/source/repos/test/build
Consolidate compiler generated dependencies of target QsGeodataMod
[100%] Built target QsGeodataMod
[info] [tid 645] [main.cc:102] Loaded clang-uml config from .clang-uml
[info] [tid 645] [main.cc:105] Loading compilation database from build directory
[info] [tid 655] [generator.h:234] Generating diagram myproject_class.puml
[debug] [tid 655] [generator.h:244] Processing glob: Position.h
[debug] [tid 655] [generator.h:244] Processing glob: Position.cpp
[simple file parser] [info] parsing file 'Position.h'
[simple file parser] [info] parsing file 'Position.cpp'
[debug] [tid 655] [translation_unit_visitor.cc:138] ========== Visiting 'QdiPosition' - class
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type QdiPosition const&, reference, QdiPosition const&
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type QdiPosition const, cv_qualified, QdiPosition
[debug] [tid 655] [translation_unit_visitor.cc:1552] Finding relationships in user defined type: QdiPosition const | QdiPosition const
[debug] [tid 655] [translation_unit_context.cc:87] Alias QdiPosition not found in index
[debug] [tid 655] [translation_unit_visitor.cc:1002] Adding method: operator=
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type double, builtin, double
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type double, builtin, double
[debug] [tid 655] [translation_unit_visitor.cc:870] Processing field x_ with unreferenced type of kind builtin
[debug] [tid 655] [translation_unit_visitor.cc:873] Builtin type found for field: x_
[debug] [tid 655] [translation_unit_visitor.cc:870] Processing field y_ with unreferenced type of kind builtin
[debug] [tid 655] [translation_unit_visitor.cc:873] Builtin type found for field: y_
[debug] [tid 655] [translation_unit_visitor.cc:415] Setting user data for class QdiPosition, 0x7f0e94015470
[debug] [tid 655] [diagram.cc:117] Adding class: ::QdiPosition, QdiPosition
[debug] [tid 655] [nested_trait.h:63] Adding nested element QdiPosition at path ''
[debug] [tid 655] [nested_trait.h:83] Getting nested element at path: QdiPosition
[debug] [tid 655] [translation_unit_visitor.cc:138] ========== Visiting 'QdiPosition' - class
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type QdiPosition const&, reference, QdiPosition const&
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type QdiPosition const, cv_qualified, QdiPosition
[debug] [tid 655] [translation_unit_visitor.cc:1552] Finding relationships in user defined type: QdiPosition const | QdiPosition const
[debug] [tid 655] [translation_unit_context.cc:87] Alias QdiPosition not found in index
[debug] [tid 655] [translation_unit_visitor.cc:1002] Adding method: operator=
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type double, builtin, double
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type double, builtin, double
[debug] [tid 655] [translation_unit_visitor.cc:870] Processing field x_ with unreferenced type of kind builtin
[debug] [tid 655] [translation_unit_visitor.cc:873] Builtin type found for field: x_
[debug] [tid 655] [translation_unit_visitor.cc:870] Processing field y_ with unreferenced type of kind builtin
[debug] [tid 655] [translation_unit_visitor.cc:873] Builtin type found for field: y_
[debug] [tid 655] [translation_unit_visitor.cc:415] Setting user data for class QdiPosition, 0x7f0e94015470
[debug] [tid 655] [diagram.cc:117] Adding class: ::QdiPosition, QdiPosition
[debug] [tid 655] [diagram.cc:149] Class QdiPosition (QdiPosition) already in the model
[debug] [tid 655] [translation_unit_visitor.cc:138] ========== Visiting 'QdiPosition2D' - class
[debug] [tid 655] [translation_unit_visitor.cc:695] Found some other class child:  (using declaration)
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type QdiPosition2D const&, reference, QdiPosition2D const&
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type QdiPosition2D const, cv_qualified, QdiPosition2D
[debug] [tid 655] [translation_unit_visitor.cc:1552] Finding relationships in user defined type: QdiPosition2D const | QdiPosition2D const
[debug] [tid 655] [translation_unit_context.cc:87] Alias QdiPosition2D not found in index
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type QdiPosition2D const&, reference, QdiPosition2D const&
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type QdiPosition2D const, cv_qualified, QdiPosition2D
[debug] [tid 655] [translation_unit_visitor.cc:1552] Finding relationships in user defined type: QdiPosition2D const | QdiPosition2D const
[debug] [tid 655] [translation_unit_context.cc:87] Alias QdiPosition2D not found in index
[debug] [tid 655] [translation_unit_visitor.cc:1002] Adding method: operator=
[debug] [tid 655] [translation_unit_visitor.cc:619] Found base class ::QdiPosition for class QdiPosition2D
[debug] [tid 655] [translation_unit_visitor.cc:415] Setting user data for class QdiPosition2D, 0x7f0e940177c0
[debug] [tid 655] [diagram.cc:117] Adding class: ::QdiPosition2D, QdiPosition2D
[debug] [tid 655] [nested_trait.h:63] Adding nested element QdiPosition2D at path ''
[debug] [tid 655] [nested_trait.h:83] Getting nested element at path: QdiPosition2D
[debug] [tid 655] [translation_unit_visitor.cc:138] ========== Visiting 'QdiPosition2D' - class
[debug] [tid 655] [translation_unit_visitor.cc:695] Found some other class child:  (using declaration)
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type QdiPosition2D const&, reference, QdiPosition2D const&
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type QdiPosition2D const, cv_qualified, QdiPosition2D
[debug] [tid 655] [translation_unit_visitor.cc:1552] Finding relationships in user defined type: QdiPosition2D const | QdiPosition2D const
[debug] [tid 655] [translation_unit_context.cc:87] Alias QdiPosition2D not found in index
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type QdiPosition2D const&, reference, QdiPosition2D const&
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type QdiPosition2D const, cv_qualified, QdiPosition2D
[debug] [tid 655] [translation_unit_visitor.cc:1552] Finding relationships in user defined type: QdiPosition2D const | QdiPosition2D const
[debug] [tid 655] [translation_unit_context.cc:87] Alias QdiPosition2D not found in index
[debug] [tid 655] [translation_unit_visitor.cc:1002] Adding method: operator=
[debug] [tid 655] [translation_unit_visitor.cc:619] Found base class ::QdiPosition for class QdiPosition2D
[debug] [tid 655] [translation_unit_visitor.cc:415] Setting user data for class QdiPosition2D, 0x7f0e940177c0
[debug] [tid 655] [diagram.cc:117] Adding class: ::QdiPosition2D, QdiPosition2D
[debug] [tid 655] [diagram.cc:149] Class QdiPosition2D (QdiPosition2D) already in the model
[debug] [tid 655] [translation_unit_visitor.cc:138] ========== Visiting 'QdiPosition3D' - class
[debug] [tid 655] [translation_unit_visitor.cc:695] Found some other class child:  (using declaration)
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type QdiPosition3D const&, reference, QdiPosition3D const&
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type QdiPosition3D const, cv_qualified, QdiPosition3D
[debug] [tid 655] [translation_unit_visitor.cc:1552] Finding relationships in user defined type: QdiPosition3D const | QdiPosition3D const
[debug] [tid 655] [translation_unit_context.cc:87] Alias QdiPosition3D not found in index
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type QdiPosition3D const&, reference, QdiPosition3D const&
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type QdiPosition3D const, cv_qualified, QdiPosition3D
[debug] [tid 655] [translation_unit_visitor.cc:1552] Finding relationships in user defined type: QdiPosition3D const | QdiPosition3D const
[debug] [tid 655] [translation_unit_context.cc:87] Alias QdiPosition3D not found in index
[debug] [tid 655] [translation_unit_visitor.cc:1002] Adding method: operator=
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type double, builtin, double
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type double, builtin, double
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type double, builtin, double
[debug] [tid 655] [translation_unit_visitor.cc:870] Processing field z_ with unreferenced type of kind builtin
[debug] [tid 655] [translation_unit_visitor.cc:873] Builtin type found for field: z_
[debug] [tid 655] [translation_unit_visitor.cc:619] Found base class ::QdiPosition for class QdiPosition3D
[debug] [tid 655] [translation_unit_visitor.cc:415] Setting user data for class QdiPosition3D, 0x7f0e94018e70
[debug] [tid 655] [diagram.cc:117] Adding class: ::QdiPosition3D, QdiPosition3D
[debug] [tid 655] [nested_trait.h:63] Adding nested element QdiPosition3D at path ''
[debug] [tid 655] [nested_trait.h:83] Getting nested element at path: QdiPosition3D
[debug] [tid 655] [translation_unit_visitor.cc:138] ========== Visiting 'QdiPosition3D' - class
[debug] [tid 655] [translation_unit_visitor.cc:695] Found some other class child:  (using declaration)
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type QdiPosition3D const&, reference, QdiPosition3D const&
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type QdiPosition3D const, cv_qualified, QdiPosition3D
[debug] [tid 655] [translation_unit_visitor.cc:1552] Finding relationships in user defined type: QdiPosition3D const | QdiPosition3D const
[debug] [tid 655] [translation_unit_context.cc:87] Alias QdiPosition3D not found in index
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type QdiPosition3D const&, reference, QdiPosition3D const&
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type QdiPosition3D const, cv_qualified, QdiPosition3D
[debug] [tid 655] [translation_unit_visitor.cc:1552] Finding relationships in user defined type: QdiPosition3D const | QdiPosition3D const
[debug] [tid 655] [translation_unit_context.cc:87] Alias QdiPosition3D not found in index
[debug] [tid 655] [translation_unit_visitor.cc:1002] Adding method: operator=
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type double, builtin, double
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type double, builtin, double
[debug] [tid 655] [translation_unit_visitor.cc:1438] Finding relationships for type double, builtin, double
[debug] [tid 655] [translation_unit_visitor.cc:870] Processing field z_ with unreferenced type of kind builtin
[debug] [tid 655] [translation_unit_visitor.cc:873] Builtin type found for field: z_
[debug] [tid 655] [translation_unit_visitor.cc:619] Found base class ::QdiPosition for class QdiPosition3D
[debug] [tid 655] [translation_unit_visitor.cc:415] Setting user data for class QdiPosition3D, 0x7f0e94018e70
[debug] [tid 655] [diagram.cc:117] Adding class: ::QdiPosition3D, QdiPosition3D
[debug] [tid 655] [diagram.cc:149] Class QdiPosition3D (QdiPosition3D) already in the model
[debug] [tid 655] [diagram.cc:199] Looking for alias for ::QdiPosition
[debug] [tid 655] [class_diagram_generator.cc:326] === Skipping inheritance relation from ::QdiPosition to QdiPosition2D due to: Missing alias for ::QdiPosition
[debug] [tid 655] [diagram.cc:199] Looking for alias for ::QdiPosition
[debug] [tid 655] [class_diagram_generator.cc:326] === Skipping inheritance relation from ::QdiPosition to QdiPosition3D due to: Missing alias for ::QdiPosition
[info] [tid 655] [main.cc:210] Written myproject_class diagram to puml/myproject_class.puml

result

@startuml
class "QdiPosition" as C_0000000002
class C_0000000002 {
{static} +QdiPosition() : void
+operator=(QdiPosition const& position) : QdiPosition&
{static} +QdiPosition(double x, double y) : void
{static} +~QdiPosition() : void
-x_ : double
-y_ : double
}
class "QdiPosition2D" as C_0000000008
class C_0000000008 {
{static} +QdiPosition2D(QdiPosition2D const& obj) : void
+operator=(QdiPosition2D const& position2D) : QdiPosition2D&
{static} +~QdiPosition2D() : void
}
class "QdiPosition3D" as C_0000000016
class C_0000000016 {
{static} +QdiPosition3D(QdiPosition3D const& obj) : void
+operator=(QdiPosition3D const& position3D) : QdiPosition3D&
{static} +QdiPosition3D(double x, double y, double z) : void
{static} +~QdiPosition3D() : void
-z_ : double
}
@enduml

from clang-uml.

bkryza avatar bkryza commented on June 13, 2024

@meastp I've tentatively fixed this issue in the branch fix-root-namespace-handling, I've also added 2 test cases to emulate the various issues with referencing root namespaces (not yet complete - but should address at least your issue):

If you can please try to checkout branch fix-root-namespace-handling, rebuild clang-uml and check again if the generated diagrams include the missing relationships now.

I will work on this a little further next week to include more edge cases related to referencing root namespace from various places in the code and when I'm more confident it's fine I'll merge it to master...

from clang-uml.

meastp avatar meastp commented on June 13, 2024

@bkryza This helped a lot - thanks :)

I still have a few errors/questions, but not sure if they are related to this problem.

I get quite a few
[libclang parser] [error] include/myfile.h:0: cannot create id for entity

Is it possible to print more information so I can try to find the culprit? Is this from clang-uml or upstream libclang?

from clang-uml.

bkryza avatar bkryza commented on June 13, 2024

@meastp Actually this error is from cppast which as an abstraction layer over libclang. I use my fork of this library with a few additions I needed, so I might have introduced some bugs, although the actual error seems to be in the original code. Also what is strange is that the line number reported by the error is 0...

Could you try to run clang-uml in gdb like this (assuming you've built it in debug mode)?

gdb --args ../../clang-uml/debug/clang-uml -v
break parse_functions.cpp:17 if usr.empty()
run
# and after it stops on breakpoint
bt full

and paste the output here - this will at least show what kind of entity it was trying to parse.

To build clang-uml in debug mode just type make debug - it will create debug subdirectory and invoke cmake.

from clang-uml.

meastp avatar meastp commented on June 13, 2024

@bkryza sure, is this helpful (or do you need the absoulte complete output - see last line)?

(gdb) bt full
#0  cppast::detail::get_entity_id (cur=...) at /myproj/clang-uml/thirdparty/cppast/src/libclang/parse_functions.cpp:17
        usr = {str_ = {<type_safe::detail::optional_storage<type_safe::direct_optional_storage<cppast::detail::cxstring::string> >> = {storage = {storage_ = {
                  __data = "\320v\001\344\377\177\000\000\002\000\000\000\377\177\000\000\350v\001\344\377\177\000\000\v\000\000\000\000\000\000", __align = {<No data fields>}},
                empty_ = false}}, <type_safe::detail::copy_control<true>> = {<No data fields>}, <type_safe::detail::move_control<true>> = {<No data fields>}, <No data fields>}}
#1  0x000055555588fe8d in cppast::detail::parse_cpp_class (context=..., cur=..., parent_cur=...) at /myproj/clang-uml/thirdparty/cppast/src/libclang/class_parser.cpp:166
        is_templated = false
        is_friend = false
        builder = {class_ = std::unique_ptr<cppast::cpp_class> = {get() = 0x7fffdc7836c0}}
        semantic_parent = {<type_safe::detail::optional_storage<type_safe::direct_optional_storage<cppast::basic_cpp_entity_ref<cppast::cpp_entity, cppast::detail::cpp_entity_ref_predicate> > >> = {storage = {
              storage_ = {__data = "P\267\062\355\377\177\000\000\336v\205UUU\000\000F", '\000' <repeats 39 times>, " \300\062\355\377\177\000", __align = {<No data fields>}},
              empty_ = true}}, <type_safe::detail::copy_control<true>> = {<No data fields>}, <type_safe::detail::move_control<true>> = {<No data fields>}, <No data fields>}
#2  0x000055555584121f in cppast::detail::parse_entity (context=..., parent=0x7fffe401e130, cur=..., parent_cur=...)
    at /myproj/clang-uml/thirdparty/cppast/src/libclang/parse_functions.cpp:155
        kind = CXCursor_ClassDecl
        ex = <error reading variable: Cannot access memory at address 0x0>
        ex = @0xf080c32ea0fe4300: <incomplete type>
#3  0x0000555555838f57 in cppast::libclang_parser::do_parse(cppast::cpp_entity_index const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, cppast::compile_config const&) const::$_7::operator()(CXCursor const&) const (this=0x7fffed32c6f0, cur=...) at /myproj/clang-uml/thirdparty/cppast/src/libclang/libclang_parser.cpp:633
        entity = std::unique_ptr<cppast::cpp_entity> = {get() = 0x0}
#4  0x0000555555838792 in cppast::detail::visit_tu<cppast::libclang_parser::do_parse(cppast::cpp_entity_index const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, cppast::compile_config const&) const::$_7>(cppast::detail::raii_wrapper<CXTranslationUnitImpl*, cppast::detail::cxtranslation_unit_deleter> const&, char const*, cppast::libclang_parser::do_parse(cppast::cpp_entity_index const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, cppast::compile_config const&) const::$_7)::{lambda(CXCursor const&)#2}::operator()(CXCursor const&) const (this=0x7fffed32c650,
    cur=...) at /myproj/clang-uml/thirdparty/cppast/src/libclang/libclang_visitor.hpp:54
No locals.
#5  0x0000555555839148 in cppast::detail::visit_children<cppast::detail::visit_tu<cppast::libclang_parser::do_parse(cppast::cpp_entity_index const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, cppast::compile_config const&) const::$_7>(cppast::detail::raii_wrapper<CXTranslationUnitImpl*, cppast::detail::cxtranslation_unit_deleter> const&, char const*, cppast::libclang_parser::do_parse(cppast::cpp_entity_index const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, cppast::compile_config const&) const::$_7)::{lambda(CXCursor const&)#2}>(CXCursor, cppast::detail::visit_tu<cppast::libclang_parser::do_parse(cppast::cpp_entity_index const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, cppast::compile_config const&) const::$_7>(cppast::detail::raii_wrapper<CXTranslationUnitImpl*, cppast::detail::cxtranslation_unit_deleter> const&, char const*, cppast::libclang_parser::do_parse(cppast::cpp_entity_index const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, cppast::compile_config const&) const::$_7)::{lambda(CXCursor const&)#2}, bool)::{lambda(CXCursor, CXCursor, void*)#1}::operator()(CXCursor, CXCursor, void*) const (this=0x7fffed32c650,
    cur=..., data=0x7fffed32c650) at /myproj/clang-uml/thirdparty/cppast/src/libclang/libclang_visitor.hpp:22
        actual_cb = @0x7fffed32c650: {in_tu = @0x7fffed32c6c8, f = @0x7fffed32c6f0}
#6  0x0000555555839112 in cppast::detail::visit_children<cppast::detail::visit_tu<cppast::libclang_parser::do_parse(cppast::cpp_entity_index const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, cppast::compile_config const&) const::$_7>(cppast::detail::raii_wrapper<CXTranslationUnitImpl*, cppast::detail::cxtranslation_unit_deleter> const&, char const*, cppast::libclang_parser::do_parse(cppast::cpp_entity_index const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, cppast::compile_config const&) const::$_7)::{lambda(CXCursor const&)#2}>(CXCursor, cppast::detail::visit_tu<cppast::libclang_parser::do_parse(cppast::cpp_entity_index const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, cppast::compile_config const&) const::$_7>(cppast::detail::raii_wrapper<CXTranslationUnitImpl*, cppast::detail::cxtranslation_unit_deleter> const&, char const*, cppast::libclang_parser::do_parse(cppast::cpp_entity_index const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, cppast::compile_config const&) const::$_7)::{lambda(CXCursor const&)#2}, bool)::{lambda(CXCursor, CXCursor, void*)#1}::__invoke(CXCursor, CXCursor, void*) (cur=..., data=0x7fffed32c650)
    at /myproj/clang-uml/thirdparty/cppast/src/libclang/libclang_visitor.hpp:20
No locals.
#7  0x00007ffff673933c in ?? () from /lib/x86_64-linux-gnu/libclang-14.so.13
No symbol table info available.
#8  0x00007ffff67394c8 in ?? () from /lib/x86_64-linux-gnu/libclang-14.so.13
No symbol table info available.
#9  0x00007ffff6737db4 in ?? () from /lib/x86_64-linux-gnu/libclang-14.so.13
No symbol table info available.
#10 0x00007ffff6744504 in clang_visitChildren () from /lib/x86_64-linux-gnu/libclang-14.so.13
No symbol table info available.
#11 0x000055555583864d in cppast::detail::visit_children<cppast::detail::visit_tu<cppast::libclang_parser::do_parse(cppast::cpp_entity_index const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, cppast::compile_config const&) const::$_7>(cppast::detail::raii_wrapper<CXTranslationUnitImpl*, cppast::detail::cxtranslation_unit_deleter> const&, char const*, cppast::libclang_parser::do_parse(cppast::cpp_entity_index const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, cppast::compile_config const&) const::$_7)::{lambda(CXCursor const&)#2}>(CXCursor, cppast::detail::visit_tu<cppast::libclang_parser::do_parse(cppast::cpp_entity_index const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, cppast::compile_config const&) const::$_7>(cppast::detail::raii_wrapper<CXTranslationUnitImpl*, cppast::detail::cxtranslation_unit_deleter> const&, char const*, cppast::libclang_parser::do_parse(cppast::cpp_entity_index const&, std::__cxx11::basic_string<char, std::char_traits<ch--Type <RET> for more, q to quit, c to continue without paging--
ar>, std::allocator<char> >, cppast::compile_config const&) const::$_7)::{lambda(CXCursor const&)#2}, bool) (parent=..., f=..., recurse=false)
    at /myproj/clang-uml/thirdparty/cppast/src/libclang/libclang_visitor.hpp:34
        continue_lambda = {<No data fields>}
        recurse_lambda = {<No data fields>}
#12 0x000055555583636a in cppast::detail::visit_tu<cppast::libclang_parser::do_parse(cppast::cpp_entity_index const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, cppast::compile_config const&) const::$_7>(cppast::detail::raii_wrapper<CXTranslationUnitImpl*, cppast::detail::cxtranslation_unit_deleter> const&, char const*, cppast::libclang_parser::do_parse(cppast::cpp_entity_index const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, cppast::compile_config const&) const::$_7) (tu=..., path=0x7fffed32cd40 "include/AND.h", f=...)
    at /myproj/clang-uml/thirdparty/cppast/src/libclang/libclang_visitor.hpp:52
        in_tu = {path = @0x7fffed32c6d0}
#13 0x0000555555835850 in cppast::libclang_parser::do_parse (this=0x7fffed32d1d0, idx=..., Python Exception <class 'gdb.error'>: There is no member named _M_p.
path=, c=...)
    at /myproj/clang-uml/thirdparty/cppast/src/libclang/libclang_parser.cpp:591
        config = @0x7fffed32cf38: {<cppast::compile_config> = {_vptr$compile_config = 0x555555a5b040 <vtable for cppast::libclang_compile_config+16>, flags_ = std::vector of length 15, capacity 15 = {Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.

              , Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
}}, Python Exception <class 'gdb.error'>: There is no member named _M_p.
clang_binary_ = , write_preprocessed_ = false, fast_preprocessing_ = false, remove_comments_in_macro_ = true}
        file = 0x7fffdc001700
        builder = {file_ = std::unique_ptr<cppast::cpp_file> = {get() = 0x7fffe401e130}}
        context = {tu = 0x7fffdc009ba0, file = 0x7fffdc001700, logger = {ptr_ = 0x555555a5f530 <cppast::default_logger()::logger>}, idx = {ptr_ = 0x7fffed32d210}, comments = {cur_ = 0x0, end_ = 0x0},
          error = false, current_function = std::optional<cppast::cpp_entity_id> [no contained value], current_class = std::optional<cppast::cpp_entity_id> [no contained value], Python Exception <class 'gdb.error'>: There is no member named _M_p.
current_function_usr = }
        preprocessed = {Python Exception <class 'gdb.error'>: There is no member named _M_p.
source = , includes = std::vector of length 2, capacity 2 = {{Python Exception <class 'gdb.error'>: There is no member named _M_p.
file_name = , Python Exception <class 'gdb.error'>: There is no member named _M_p.
full_path = , kind = cppast::cpp_include_kind::system, line = 6}, {Python Exception <class 'gdb.error'>: There is no member named _M_p.
file_name = , Python Exception <class 'gdb.error'>: There is no member named _M_p.
full_path = ,
              kind = cppast::cpp_include_kind::local, line = 11}}, macros = std::vector of length 2, capacity 2 = {{macro = std::unique_ptr<cppast::cpp_macro_definition> = {get() = 0x0}, line = 4}, {
              macro = std::unique_ptr<cppast::cpp_macro_definition> = {get() = 0x0}, line = 5}}, comments = std::vector of length 0, capacity 0}
        tu = {<cppast::detail::cxtranslation_unit_deleter> = {<No data fields>}, obj_ = 0x7fffdc009ba0}
        macro_iter = {macro = std::unique_ptr<cppast::cpp_macro_definition> = {get() = 0x670067}, line = 53}
Python Exception <class 'gdb.error'>: There is no member named _M_p.
Python Exception <class 'gdb.error'>: There is no member named _M_p.
        include_iter = {file_name = , full_path = , kind = (unknown: 0xe40160b0), line = 32767}
        ex = <error reading variable: Cannot access memory at address 0x989680>
#14 0x0000555555681b33 in cppast::parser::parse (this=0x7fffed32d1d0, idx=..., Python Exception <class 'gdb.error'>: There is no member named _M_p.
path=, config=...) at /myproj/clang-uml/thirdparty/cppast/include/cppast/parser.hpp:43
No locals.
#15 0x00005555556812c6 in cppast::simple_file_parser<cppast::libclang_parser>::parse (this=0x7fffed32d1d0, Python Exception <class 'gdb.error'>: There is no member named _M_p.
path=, c=...)
    at /myproj/clang-uml/thirdparty/cppast/include/cppast/parser.hpp:116
        file = std::unique_ptr<cppast::cpp_file> = {get() = 0x3000000002}
        ptr = 0x7fffed32cf38
#16 0x0000555555680ea9 in cppast::parse_files<cppast::simple_file_parser<cppast::libclang_parser>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, cppast::parse_files<cppast::simple_file_parser<cppast::libclang_parser>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&>(cppast::simple_file_parser<cppast::libclang_parser>&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, cppast::libclang_compilation_database const&)::{lambda(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)#1}>(cppast::simple_file_parser<cppast::libclang_parser>&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, cppast::parse_files<cppast::simple_file_parser<cppast::libclang_parser>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&>(cppast::simple_file_parser<cppast::libclang_parser>&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, cppast::libclang_compilation_database const&)::{lambda(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)#1} const&) (parser=...,
    file_names=std::vector of length 135, capacity 256 = {...}, get_config=...) at /myproj/clang-uml/thirdparty/cppast/include/cppast/parser.hpp:197
        config = @0x7fffed32cf38: {<cppast::compile_config> = {_vptr$compile_config = 0x555555a5b040 <vtable for cppast::libclang_compile_config+16>, flags_ = std::vector of length 15, capacity 15 = {Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.

              , Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
}}, Python Exception <class 'gdb.error'>: There is no member named _M_p.
clang_binary_ = , write_preprocessed_ = false, fast_preprocessing_ = false, remove_comments_in_macro_ = true}
Python Exception <class 'gdb.error'>: There is no member named _M_p.
        file =
        __range2 = std::vector of length 135, capacity 256 = {Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.

          , Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
}
Python Exception <class 'gdb.error'>: There is no member named _M_p.
        __begin0 =
Python Exception <class 'gdb.error'>: There is no member named _M_p.
        __end0 =
#17 0x00005555556471bd in cppast::parse_files<cppast::simple_file_parser<cppast::libclang_parser>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&> (parser=..., file_names=std::vector of length 135, capacity 256 = {...}, database=...)
    at /myproj/clang-uml/thirdparty/cppast/include/cppast/libclang_parser.hpp:233
No locals.
#18 0x0000555555590029 in clanguml::common::generators::plantuml::generate<clanguml::class_diagram::model::diagram, clanguml::config::class_diagram, clanguml::class_diagram::visitor::translation_unit_visitor> (
    db=..., Python Exception <class 'gdb.error'>: There is no member named _M_p.
name=, config=..., verbose=true) at /myproj/clang-uml/src/common/generators/plantuml/generator.h:258
        diagram = std::unique_ptr<clanguml::class_diagram::model::diagram> = {get() = 0x7fffe4002e70}
        translation_units = std::vector of length 135, capacity 256 = {Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.

          , Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
, Python Exception <class 'gdb.error'>: There is no member named _M_p.
}
        idx = {mutex_ = {<std::__mutex_base> = {_M_mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}},
                __size = '\000' <repeats 39 times>, __align = 0}}, <No data fields>}, map_ = std::unordered_map with 0 elements, ns_ = std::unordered_map with 0 elements}
        logger = {ptr_ = 0x555555a5f530 <cppast::default_logger()::logger>}
        parser = {parser_ = {<cppast::parser> = {_vptr$parser = 0x555555a5b080 <vtable for cppast::libclang_parser+16>, logger_ = {ptr_ = 0x555555a5f530 <cppast::default_logger()::logger>}, error_ = {_M_base = {
                  static _S_alignment = 1, _M_i = false}, static is_always_lock_free = true}}, pimpl_ = std::unique_ptr<cppast::libclang_parser::impl> = {get() = 0x7fffe40059b0}}, files_ = {
            first_ = std::unique_ptr<cppast::cpp_file> = {get() = 0x0}, last_ = {<type_safe::detail::optional_storage<type_safe::reference_optional_storage<cppast::cpp_file, false> >> = {storage = {
                  pointer_ = 0x0}}, <type_safe::detail::copy_control<true>> = {<No data fields>}, <type_safe::detail::move_control<true>> = {<No data fields>}, <No data fields>}}, idx_ = {ptr_ = 0x7fffed32d210}}
        ctx = {ctx = {ns_ = {path_ = std::vector of length 0, capacity 0}, using_ns_declarations_ = std::map with 0 elements, entity_index_ = @0x7fffed32d210, diagram_ = @0x7fffe4002e70, config_ = @0x555555af7ac0,
            namespace_alias_index_ = std::map with 0 elements, alias_index_ = std::map with 0 elements, alias_template_index_ = std::map with 0 elements,
            current_package_ = {<type_safe::detail::optional_storage<type_safe::reference_optional_storage<clanguml::common::model::package, false> >> = {storage = {
    pointer_ = 0x0}}, <type_safe::detail::copy_control<true>> = {<No data fields>}, <type_safe::detail::move_control<true>> = {<No data fields>}, <No data fields>}}}
#19 0x0000555555584e5b in generate_diagram (Python Exception <class 'gdb.error'>: There is no member named _M_p.
od=, Python Exception <class 'gdb.error'>: There is no member named _M_p.
name=, diagram=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<clanguml::config::class_diagram, std::allocator<clanguml::config::class_diagram>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<clanguml::config::class_diagram, std::allocator<clanguml::config::class_diagram>, (__gnu_cxx::_Lock_policy)2>'
std::shared_ptr<clanguml::config::diagram> (use count 2, weak count 0) = {...}, db=..., verbose=true)
    at /myproj/clang-uml/src/main.cc:159
        model = std::unique_ptr<clanguml::class_diagram::model::diagram> = {get() = 0x7fffe4002e70}
Python Exception <class 'gdb.error'>: There is no member named _M_p.
Python Exception <class 'gdb.error'>: No type named std::filesystem::__cxx11::path::_Cmpt.
        path = filesystem::path
        ofs = <incomplete type>
#20 0x0000555555585c26 in main::$_0::operator() (this=0x555555b283b0) at /myproj/clang-uml/src/main.cc:127
No locals.
#21 0x0000555555585bad in std::__invoke_impl<void, main::$_0&> (__f=...) at /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:61
No locals.
#22 0x0000555555585b5d in std::__invoke_r<void, main::$_0&> (__fn=...) at /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:111
No locals.
#23 0x0000555555585a2d in std::_Function_handler<void (), main::$_0>::_M_invoke(std::_Any_data const&) (__functor=...) at /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:290
No locals.
#24 0x00005555555cc995 in std::function<void ()>::operator()() const (this=0x555555aefeb8) at /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:590
No locals.
#25 0x000055555580a2dd in std::__invoke_impl<void, std::function<void ()>&>(std::__invoke_other, std::function<void ()>&) (__f=...)
    at /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:61
No locals.
#26 0x000055555580a2ad in std::__invoke_r<void, std::function<void ()>&>(std::function<void ()>&) (__fn=...) at /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:111
No locals.
#27 0x000055555580a1cc in std::__future_base::_Task_state<std::function<void ()>, std::allocator<int>, void ()>::_M_run()::{lambda()#1}::operator()() const (this=0x7fffed32ec90)
    at /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/future:1468
No locals.
#28 0x000055555580a0dc in std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<std::function<void ()>, std::allocator<int>, void ()>::_M_run()::{lambda()#1}, void>::operator()() const (this=0x7fffed32ec70) at /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/future:1409
No locals.
#29 0x000055555580a030 in std::__invoke_impl<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<std::function<void ()>, std::allocator<int>, void ()>::_M_run()::{lambda()#1}, void>&>(std::__invoke_other, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<std::function<void ()>, std::allocator<int>, void ()>::_M_run()::{lambda()#1}, void>&) (__f=...) at /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:61
No locals.
#30 0x0000555555809fb0 in std::__invoke_r<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<std::function<void ()>, std::allocator<int>, void ()>::_M_run()::{lambda()#1}, void>&>(std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<std::function<void ()>, std::allocator<int>, void ()>::_M_run()::{lambda()#1}, void>&) (__fn=...)
    at /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:114
No locals.
#31 0x0000555555809e90 in std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<std::function<void ()>, std::allocator<int>, void ()>::_M_run()::{lambda()#1}, void> >::_M_invoke(std::_Any_data const&)
    (__functor=...) at /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:290
--Type <RET> for more, q to quit, c to continue without paging--

from clang-uml.

bkryza avatar bkryza commented on June 13, 2024

@meastp I think I know what can be the problem - could you comment out the line 166 in thirdparty/cppast/src/libclang/class_parser.cpp, rebuild and retry? It shouldn't break anything in class diagram generation...

If this helps I'm apparently not checking some edge case in that modification of cppast in a method which parses class declarations - if so I would appreciate if you could give me some more insight if there's something specific about the classes in that header (e.g. are there forward declarations?)

from clang-uml.

meastp avatar meastp commented on June 13, 2024

@bkryza I commented class_parser.cpp:166

        context.comments.match(builder.get(), cur);
//        context.current_class = detail::get_entity_id(cur);
        detail::visit_children(cur, [&](const CXCursor& child) {

This did not help, unfortunately - still the same output with the rebuilt invocation of clang-uml -v ( I deleted the release directory and rebuilt one extra time to be sure) :/

from clang-uml.

meastp avatar meastp commented on June 13, 2024

(side question: is there a way to get rid of the ..> relations? I thought this would be include_relations_also_as_members: false but apparently not)

from clang-uml.

bkryza avatar bkryza commented on June 13, 2024

@meastp
As to the error - it's strange - does it still break in the gdb on the same line as before? Also - is some specific class actually missing from the generated output due to these errors? There is another issue related to the order in which sources are parsed but if for instance if it's a case of forward declaration then it should be generated when the actual declaration is found...

As to the dependency relationships - you can filter them out using:

exclude:
  relationships:
    - dependency

also checkout this example

from clang-uml.

meastp avatar meastp commented on June 13, 2024

@bkryza I managed to isolate to a test case (not sure if this explains all the messages, we'll see :) )

here is a complete and minimal testcase (having a .cpp file is just to be able to build with CMake, I don't remember the syntax for header-only lib):

.clang-uml
CMakeLists.txt
Position.h
Position.cpp

.clang-uml:

compilation_database_dir: build
output_directory: puml
diagrams:
  myproject_class:
    type: class
    glob:
      - Position.h
      - Position.cpp
    exclude:
        namespaces:
          - std

(the error happens independently of the exclude line above - same error if I remove it)

CMakeLists.txt:

cmake_minimum_required(VERSION 3.11)
project(qms VERSION 1.0.0 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

add_library(MyProj SHARED)

target_compile_features(MyProj PRIVATE cxx_std_17)

target_sources(MyProj 
    PRIVATE
${CMAKE_CURRENT_LIST_DIR}/Position.h
${CMAKE_CURRENT_LIST_DIR}/Position.cpp
)

Position.h

#pragma once

#include <vector>
#include <cstdint>

class Position2D
{
	std::vector<std::uint8_t> data;
 public:
    Position2D();
};

Position.cpp

#include "Position.h"

Position2D::Position2D() = default;

cmd:
export CC=/usr/bin/clang-14; export CXX=/usr/bin/clang++-14; mkdir build; cd build; cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE ../../test/; cmake --build .; cd ..; clang-uml -v

output:

-- Configuring done
-- Generating done
-- Build files have been written to: /mytestproj/build
Consolidate compiler generated dependencies of target MyProj
[ 50%] Building CXX object CMakeFiles/MyProj.dir/Position.cpp.o
[100%] Linking CXX shared library libMyProj.so
[100%] Built target MyProj
[info] [tid 7211] [main.cc:102] Loaded clang-uml config from .clang-uml
[info] [tid 7211] [main.cc:105] Loading compilation database from build directory
[info] [tid 7221] [generator.h:234] Generating diagram myproject_class.puml
[debug] [tid 7221] [generator.h:244] Processing glob: Position.h
[debug] [tid 7221] [generator.h:244] Processing glob: Position.cpp
[simple file parser] [info] parsing file 'Position.h'
[libclang parser] [error] Position.h:0: cannot create id for entity
[simple file parser] [info] parsing file 'Position.cpp'
[debug] [tid 7221] [translation_unit_visitor.cc:138] ========== Visiting 'Position2D' - class
[debug] [tid 7221] [translation_unit_visitor.cc:415] Setting user data for class Position2D, 0x7f0628016830
[debug] [tid 7221] [diagram.cc:117] Adding class: ::Position2D, Position2D
[debug] [tid 7221] [nested_trait.h:63] Adding nested element Position2D at path ''
[debug] [tid 7221] [nested_trait.h:83] Getting nested element at path: Position2D
[debug] [tid 7221] [translation_unit_visitor.cc:138] ========== Visiting 'Position2D' - class
[debug] [tid 7221] [translation_unit_visitor.cc:415] Setting user data for class Position2D, 0x7f0628016830
[debug] [tid 7221] [diagram.cc:117] Adding class: ::Position2D, Position2D
[debug] [tid 7221] [diagram.cc:149] Class Position2D (Position2D) already in the model
[info] [tid 7221] [main.cc:210] Written myproject_class diagram to puml/myproject_class.puml

result

@startuml
class "Position2D" as C_0000000002
class C_0000000002 {
{static} +Position2D() : void
}
@enduml

from clang-uml.

bkryza avatar bkryza commented on June 13, 2024

@meastp I have identified the problem - it is related to improper handling of std::uint8_t which is exposed into std namespace through using directive from global namespace and then it is double typedef to unsigned char - I will try to figure out a fix for this.

You can see that if you change it to std::vector<uint8_t> data; it works...

from clang-uml.

bkryza avatar bkryza commented on June 13, 2024

@meastp Ok I think it should be fixed now, I've also fixed a bug that caused constructors to always be static in PlantUML diagrams, with the latest commit this is what I get:

@startuml
class "Position2D" as C_0000000002
class C_0000000002 {
+Position2D() : void
-data : std::vector<std::uint8_t>
}
@enduml

So again, please pull the latest commit from this branch, update git submodules (you can do this using make submodules) and rerun again against your codebase...

from clang-uml.

meastp avatar meastp commented on June 13, 2024

@bkryza thank you for moving so quickly on this :)

When I update the branch fix-root-namespace-handling and run on my example, I get an abort:

clang-uml/release/clang-uml -v
[info] [tid 4514] [main.cc:102] Loaded clang-uml config from .clang-uml
[info] [tid 4514] [main.cc:105] Loading compilation database from build directory
[info] [tid 4524] [generator.h:234] Generating diagram myproject_class.puml
[debug] [tid 4524] [generator.h:244] Processing glob: Position.h
[debug] [tid 4524] [generator.h:244] Processing glob: Position.cpp
[simple file parser] [info] parsing file 'Position.h'
[simple file parser] [info] parsing file 'Position.cpp'
[debug] [tid 4524] [translation_unit_visitor.cc:138] ========== Visiting 'Position2D' - class
[debug] [tid 4524] [translation_unit_visitor.cc:872] Processing field data with unreferenced type of kind template_instantiation
[debug] [tid 4524] [translation_unit_visitor.cc:705] Processing field with template instantiation type std::vector<std::uint8_t>
[debug] [tid 4524] [translation_unit_context.cc:135] Alias template std::vector not found in index
[debug] [tid 4524] [translation_unit_context.cc:135] Alias template std::vector not found in index
[debug] [tid 4524] [translation_unit_context.cc:87] Alias std::vector not found in index
[debug] [tid 4524] [translation_unit_context.cc:135] Alias template std::vector not found in index
[debug] [tid 4524] [translation_unit_context.cc:135] Alias template std::vector not found in index
[debug] [tid 4524] [translation_unit_context.cc:87] Alias std::vector not found in index
[debug] [tid 4524] [translation_unit_visitor.cc:1693] Template instantiation std::vector<std::uint8_t> has no primary template?
[debug] [tid 4524] [translation_unit_visitor.cc:1699] Building template instantiation for std::vector<std::uint8_t>
[debug] [tid 4524] [translation_unit_visitor.cc:1843] Template argument is an expression
[debug] [tid 4524] [translation_unit_visitor.cc:1746] Adding template argument 'std::uint8_t'
[debug] [tid 4524] [translation_unit_context.cc:87] Alias std::vector not found in index
[debug] [tid 4524] [diagram_element.cc:44] Skipping relationship '' - instantiation - 'std::vector<std::uint8_t>' due empty destination
[debug] [tid 4524] [translation_unit_visitor.cc:776] Adding field instantiation relationship std::vector<std::uint8_t> aggregation Position2D : data
[debug] [tid 4524] [diagram_element.cc:56] Adding relationship: 'std::vector<std::uint8_t>' - aggregation - 'Position2D'
[debug] [tid 4524] [translation_unit_visitor.cc:782] Created template instantiation: std::vector<std::uint8_t>
[debug] [tid 4524] [diagram.cc:117] Adding class: std::vector, std::vector<std::uint8_t>
[debug] [tid 4524] [nested_trait.h:63] Adding nested element vector at path 'std'
[debug] [tid 4524] [nested_trait.h:83] Getting nested element at path: std
[debug] [tid 4524] [nested_trait.h:86] Nested element std not found in element
[2022-06-22 08:18:38.130] [error] No parent element found at: std
terminate called after throwing an instance of 'std::runtime_error'
  what():  No parent element found for std
Aborted

When I change the vector to an std::array with 16 elements

(identical to the last example except this file Position.h)

#pragma once

#include <array>
#include <cstdint>

class Position2D
{
	std::array<std::uint8_t, 16> data;
 public:
    Position2D();
};

I get a new warning [libclang parser] [warning] unexpected type '' of kind 'Invalid' and abort at the end as well:

clang-uml/release/clang-uml -v
[info] [tid 4666] [main.cc:102] Loaded clang-uml config from .clang-uml
[info] [tid 4666] [main.cc:105] Loading compilation database from build directory
[info] [tid 4676] [generator.h:234] Generating diagram myproject_class.puml
[debug] [tid 4676] [generator.h:244] Processing glob: Position.h
[debug] [tid 4676] [generator.h:244] Processing glob: Position.cpp
[simple file parser] [info] parsing file 'Position.h'
[libclang parser] [warning] unexpected type '' of kind 'Invalid'
[libclang parser] [warning] unexpected type '' of kind 'Invalid'
[simple file parser] [info] parsing file 'Position.cpp'
[debug] [tid 4676] [translation_unit_visitor.cc:138] ========== Visiting 'Position2D' - class
[debug] [tid 4676] [translation_unit_visitor.cc:872] Processing field data with unreferenced type of kind template_instantiation
[debug] [tid 4676] [translation_unit_visitor.cc:705] Processing field with template instantiation type std::array<std::uint8_t,16>
[debug] [tid 4676] [translation_unit_context.cc:135] Alias template std::array not found in index
[debug] [tid 4676] [translation_unit_context.cc:135] Alias template std::array not found in index
[debug] [tid 4676] [translation_unit_context.cc:87] Alias std::array not found in index
[debug] [tid 4676] [translation_unit_context.cc:135] Alias template std::array not found in index
[debug] [tid 4676] [translation_unit_context.cc:135] Alias template std::array not found in index
[debug] [tid 4676] [translation_unit_context.cc:87] Alias std::array not found in index
[debug] [tid 4676] [translation_unit_visitor.cc:1693] Template instantiation std::array<std::uint8_t,16> has no primary template?
[debug] [tid 4676] [translation_unit_visitor.cc:1699] Building template instantiation for std::array<std::uint8_t,16>
[debug] [tid 4676] [translation_unit_visitor.cc:1843] Template argument is an expression
[debug] [tid 4676] [translation_unit_visitor.cc:1746] Adding template argument 'std::uint8_t'
[debug] [tid 4676] [translation_unit_visitor.cc:1843] Template argument is an expression
[debug] [tid 4676] [translation_unit_visitor.cc:1746] Adding template argument '16'
[debug] [tid 4676] [translation_unit_context.cc:87] Alias std::array not found in index
[debug] [tid 4676] [diagram_element.cc:44] Skipping relationship '' - instantiation - 'std::array<std::uint8_t,16>' due empty destination
[debug] [tid 4676] [translation_unit_visitor.cc:776] Adding field instantiation relationship std::array<std::uint8_t,16> aggregation Position2D : data
[debug] [tid 4676] [diagram_element.cc:56] Adding relationship: 'std::array<std::uint8_t,16>' - aggregation - 'Position2D'
[debug] [tid 4676] [translation_unit_visitor.cc:782] Created template instantiation: std::array<std::uint8_t,16>
[debug] [tid 4676] [diagram.cc:117] Adding class: std::array, std::array<std::uint8_t,16>
[debug] [tid 4676] [nested_trait.h:63] Adding nested element array at path 'std'
[debug] [tid 4676] [nested_trait.h:83] Getting nested element at path: std
[debug] [tid 4676] [nested_trait.h:86] Nested element std not found in element
[2022-06-22 08:22:31.291] [error] No parent element found at: std
terminate called after throwing an instance of 'std::runtime_error'
  what():  No parent element found for std
Aborted

from clang-uml.

bkryza avatar bkryza commented on June 13, 2024

@meastp did you exclude std namespace in your .clang-uml config? For me it works:

@startuml
class "Position2D" as C_0000000002
class C_0000000002 {
+Position2D() : void
-data : std::array<std::uint8_t,16>
}
@enduml

with the following config:

❯ cat .clang-uml
compilation_database_dir: build
output_directory: puml
diagrams:
  myproject_class:
    type: class
    glob:
      - Position.h
      - Position.cpp
    exclude:
        namespaces:
          - std

Also that warning can be usually ignored, it just means that libclang reported some token as Invalid in a specific context, and you just can't do anything with it...

from clang-uml.

meastp avatar meastp commented on June 13, 2024

@bkryza great, thanks for all your help :) I think all errors are fixed now. I had a bad_alloc that was caused by circular includes, but breaking it with forward references did the trick :)

The only thing I'm missing now is a way to render all uses of myptr::clone_ptr as owning. Ideally without modifying the source code (only change the .clang-uml config file) - is this possible?

from clang-uml.

meastp avatar meastp commented on June 13, 2024

@bkryza The source code modification worked with additional modification - I also needed relationship_t::kComposition for myptr::clone_ptr contained in an std::vector -> std::vector<myptr::clone_ptr<T>> so I added

    else if (tr_unaliased_declaration.find("std::vector") == 0) {
        nested_relationship_hint = relationship_t::kComposition;
    }

as well. I guess this isn't a general fix, but all my vector members are compositions. :)

Please to consider a configuration for this when you get to migrating this from source code to the config file :)

from clang-uml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.