Compare commits
6 Commits
remove-pac
...
llvm-17-su
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a7b4efa80e | ||
|
|
e7d6c94a14 | ||
|
|
f339c34dd8 | ||
|
|
26abb71b4c | ||
|
|
8865a42ff0 | ||
|
|
13a1012e96 |
@@ -1,6 +1,8 @@
|
|||||||
compilation_database_dir: debug
|
compilation_database_dir: debug
|
||||||
output_directory: docs/diagrams
|
output_directory: docs/diagrams
|
||||||
comment_parser: clang
|
comment_parser: clang
|
||||||
|
remove_compile_flags:
|
||||||
|
- -Wno-class-memaccess
|
||||||
generate_links:
|
generate_links:
|
||||||
link: "{% if existsIn(element, \"doxygen_link\") %}{{ element.doxygen_link }}{% endif %}"
|
link: "{% if existsIn(element, \"doxygen_link\") %}{{ element.doxygen_link }}{% endif %}"
|
||||||
tooltip: "{% if existsIn(element, \"comment\") and existsIn(element.comment, \"brief\") %}{{ abbrv(trim(replace(element.comment.brief.0, \"\\n+\", \" \")), 256) }}{% else %}{{ element.name }}{% endif %}"
|
tooltip: "{% if existsIn(element, \"comment\") and existsIn(element.comment, \"brief\") %}{{ abbrv(trim(replace(element.comment.brief.0, \"\\n+\", \" \")), 256) }}{% else %}{{ element.name }}{% endif %}"
|
||||||
@@ -72,4 +74,4 @@ diagrams:
|
|||||||
include!: uml/package/architecture_package.yml
|
include!: uml/package/architecture_package.yml
|
||||||
# Include diagrams
|
# Include diagrams
|
||||||
include_graph:
|
include_graph:
|
||||||
include!: uml/include/include.yml
|
include!: uml/include/include.yml
|
||||||
|
|||||||
@@ -132,6 +132,20 @@ if(APPLE OR (LLVM_VERSION_MAJOR GREATER_EQUAL 16))
|
|||||||
${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES})
|
${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
#
|
||||||
|
# Setup custom compile options depending on various compiler
|
||||||
|
# and environment quirks
|
||||||
|
#
|
||||||
|
if(LLVM_VERSION_MAJOR GREATER_EQUAL 17)
|
||||||
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
|
set(CUSTOM_COMPILE_OPTIONS "-Wno-class-memaccess")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
|
set(CUSTOM_COMPILE_OPTIONS
|
||||||
|
"${CUSTOM_COMPILE_OPTIONS} -Wno-unused-private-field")
|
||||||
|
endif()
|
||||||
|
|
||||||
#
|
#
|
||||||
# Setup threads library
|
# Setup threads library
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
[](https://github.com/bkryza/clang-uml/actions)
|
[](https://github.com/bkryza/clang-uml/actions)
|
||||||
[](https://codecov.io/gh/bkryza/clang-uml)
|
[](https://codecov.io/gh/bkryza/clang-uml)
|
||||||
[](https://github.com/bkryza/clang-uml/releases)
|
[](https://github.com/bkryza/clang-uml/releases)
|
||||||
[](https://github.com/bkryza/clang-uml/releases)
|
[](https://github.com/bkryza/clang-uml/releases)
|
||||||
[](https://clang-uml.github.io)
|
[](https://clang-uml.github.io)
|
||||||
|
|
||||||
`clang-uml` is an automatic C++ to UML class, sequence, package and include diagram generator, driven by
|
`clang-uml` is an automatic C++ to UML class, sequence, package and include diagram generator, driven by
|
||||||
@@ -80,6 +80,7 @@ Nowadays, this file can be generated rather easily using multiple methods:
|
|||||||
* For Boost-based projects
|
* For Boost-based projects
|
||||||
try [commands_to_compilation_database](https://github.com/tee3/commands_to_compilation_database)
|
try [commands_to_compilation_database](https://github.com/tee3/commands_to_compilation_database)
|
||||||
* For SCons, invoke `compilation_db` tool (requires SCons > 4.0.0)
|
* For SCons, invoke `compilation_db` tool (requires SCons > 4.0.0)
|
||||||
|
* For Bazel, try [bazel-compile-commands-extractor](https://github.com/hedronvision/bazel-compile-commands-extractor)
|
||||||
* For Microsoft Visual Studio projects try [Clang Power Tools](https://www.clangpowertools.com)
|
* For Microsoft Visual Studio projects try [Clang Power Tools](https://www.clangpowertools.com)
|
||||||
|
|
||||||
### Invocation
|
### Invocation
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ endif(MSVC)
|
|||||||
target_compile_features(clang-umllib INTERFACE cxx_std_17)
|
target_compile_features(clang-umllib INTERFACE cxx_std_17)
|
||||||
target_compile_options(clang-umllib PRIVATE
|
target_compile_options(clang-umllib PRIVATE
|
||||||
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:
|
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:
|
||||||
-Werror -Wall -Wextra -Wno-unused-parameter -Wno-unused-private-field
|
-Werror -Wall -Wextra -Wno-unused-parameter
|
||||||
-Wno-deprecated-declarations>
|
-Wno-deprecated-declarations ${CUSTOM_COMPILE_OPTIONS}>
|
||||||
$<$<CXX_COMPILER_ID:MSVC>:/MP /W1 /bigobj /wd4291 /wd4624 /wd4244>)
|
$<$<CXX_COMPILER_ID:MSVC>:/MP /W1 /bigobj /wd4291 /wd4624 /wd4244>)
|
||||||
target_compile_definitions(clang-umllib PRIVATE
|
target_compile_definitions(clang-umllib PRIVATE
|
||||||
$<$<CXX_COMPILER_ID:MSVC>:
|
$<$<CXX_COMPILER_ID:MSVC>:
|
||||||
@@ -40,8 +40,8 @@ add_executable(clang-uml ${MAIN_SOURCE_FILE})
|
|||||||
target_compile_features(clang-uml PUBLIC cxx_std_17)
|
target_compile_features(clang-uml PUBLIC cxx_std_17)
|
||||||
target_compile_options(clang-uml PRIVATE
|
target_compile_options(clang-uml PRIVATE
|
||||||
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:
|
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:
|
||||||
-Werror -Wall -Wextra -Wno-unused-parameter -Wno-unused-private-field
|
-Werror -Wall -Wextra -Wno-unused-parameter
|
||||||
-Wno-deprecated-declarations>
|
-Wno-deprecated-declarations ${CUSTOM_COMPILE_OPTIONS}>
|
||||||
$<$<CXX_COMPILER_ID:MSVC>:/MP /W1 /bigobj /wd4291 /wd4624 /wd4244>)
|
$<$<CXX_COMPILER_ID:MSVC>:/MP /W1 /bigobj /wd4291 /wd4624 /wd4244>)
|
||||||
target_compile_definitions(clang-uml PRIVATE
|
target_compile_definitions(clang-uml PRIVATE
|
||||||
${ENABLE_BACKWARD_CPP})
|
${ENABLE_BACKWARD_CPP})
|
||||||
|
|||||||
@@ -504,8 +504,6 @@ private:
|
|||||||
/*! Whether template argument is ellipsis (...) */
|
/*! Whether template argument is ellipsis (...) */
|
||||||
bool is_ellipsis_{false};
|
bool is_ellipsis_{false};
|
||||||
|
|
||||||
bool is_noexcept_{false};
|
|
||||||
|
|
||||||
/*! Whether the template parameter is variadic */
|
/*! Whether the template parameter is variadic */
|
||||||
bool is_variadic_{false};
|
bool is_variadic_{false};
|
||||||
|
|
||||||
|
|||||||
@@ -123,6 +123,12 @@ void translation_unit_visitor::set_source_location(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (std::filesystem::path file_path{file}; !file_path.is_absolute()) {
|
||||||
|
file_path =
|
||||||
|
std::filesystem::canonical(std::filesystem::absolute(file_path));
|
||||||
|
file = file_path.string();
|
||||||
|
}
|
||||||
|
|
||||||
element.set_file(file);
|
element.set_file(file);
|
||||||
element.set_file_relative(util::path_to_url(
|
element.set_file_relative(util::path_to_url(
|
||||||
std::filesystem::relative(element.file(), relative_to_path_).string()));
|
std::filesystem::relative(element.file(), relative_to_path_).string()));
|
||||||
|
|||||||
@@ -328,8 +328,6 @@ private:
|
|||||||
return block_end_types.count(mt) > 0;
|
return block_end_types.count(mt) > 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool started_{false};
|
|
||||||
|
|
||||||
std::map<common::model::diagram_element::id_t, activity> sequences_;
|
std::map<common::model::diagram_element::id_t, activity> sequences_;
|
||||||
|
|
||||||
std::map<common::model::diagram_element::id_t, std::unique_ptr<participant>>
|
std::map<common::model::diagram_element::id_t, std::unique_ptr<participant>>
|
||||||
|
|||||||
@@ -58,8 +58,9 @@ foreach(TEST_NAME ${TEST_CASES})
|
|||||||
target_compile_options(${TEST_NAME} PRIVATE
|
target_compile_options(${TEST_NAME} PRIVATE
|
||||||
$<$<COMPILE_LANGUAGE:CXX>:
|
$<$<COMPILE_LANGUAGE:CXX>:
|
||||||
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:
|
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:
|
||||||
-Wno-unused-parameter -Wno-unused-private-field -Wno-unused-variable
|
-Wno-unused-parameter -Wno-unused-variable
|
||||||
-Wno-attributes -Wno-nonnull -Wno-deprecated-enum-enum-conversion>
|
-Wno-attributes -Wno-nonnull -Wno-deprecated-enum-enum-conversion
|
||||||
|
${CUSTOM_COMPILE_OPTIONS}>
|
||||||
$<$<CXX_COMPILER_ID:MSVC>:/W1 /bigobj /wd4624>>)
|
$<$<CXX_COMPILER_ID:MSVC>:/W1 /bigobj /wd4624>>)
|
||||||
target_link_libraries(${TEST_NAME} PRIVATE ${CLANG_UML_TEST_LIBRARIES})
|
target_link_libraries(${TEST_NAME} PRIVATE ${CLANG_UML_TEST_LIBRARIES})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|||||||
@@ -13301,9 +13301,6 @@ bool RegexMatcher::match(std::string const &matchee) const
|
|||||||
{
|
{
|
||||||
auto flags = std::regex::ECMAScript; // ECMAScript is the default syntax
|
auto flags = std::regex::ECMAScript; // ECMAScript is the default syntax
|
||||||
// option anyway
|
// option anyway
|
||||||
#if !defined(_WIN32)
|
|
||||||
flags |= std::regex::multiline;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (m_caseSensitivity == CaseSensitive::Choice::No) {
|
if (m_caseSensitivity == CaseSensitive::Choice::No) {
|
||||||
flags |= std::regex::icase;
|
flags |= std::regex::icase;
|
||||||
|
|||||||
@@ -263,12 +263,12 @@ template <typename T>
|
|||||||
void save_diagram(const std::filesystem::path &path, const T &diagram)
|
void save_diagram(const std::filesystem::path &path, const T &diagram)
|
||||||
{
|
{
|
||||||
static_assert(
|
static_assert(
|
||||||
std::same_as<T, std::string> || std::same_as<T, nlohmann::json>);
|
std::is_same_v<T, std::string> || std::is_same_v<T, nlohmann::json>);
|
||||||
|
|
||||||
std::filesystem::create_directories(path.parent_path());
|
std::filesystem::create_directories(path.parent_path());
|
||||||
std::ofstream ofs;
|
std::ofstream ofs;
|
||||||
ofs.open(path, std::ofstream::out | std::ofstream::trunc);
|
ofs.open(path, std::ofstream::out | std::ofstream::trunc);
|
||||||
if constexpr (std::same_as<T, nlohmann::json>) {
|
if constexpr (std::is_same_v<T, nlohmann::json>) {
|
||||||
ofs << std::setw(2) << diagram;
|
ofs << std::setw(2) << diagram;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user