Fixed formatting
This commit is contained in:
@@ -1161,9 +1161,7 @@ void translation_unit_visitor::
|
|||||||
const std::string &type_name, template_parameter &tp, class_ &c)
|
const std::string &type_name, template_parameter &tp, class_ &c)
|
||||||
{
|
{
|
||||||
auto template_params = cx::util::parse_unexposed_template_params(
|
auto template_params = cx::util::parse_unexposed_template_params(
|
||||||
type_name, [this](const std::string &t) {
|
type_name, [this](const std::string &t) { return t; });
|
||||||
return t;
|
|
||||||
});
|
|
||||||
|
|
||||||
found_relationships_t relationships;
|
found_relationships_t relationships;
|
||||||
for (auto ¶m : template_params) {
|
for (auto ¶m : template_params) {
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
|
|
||||||
#include <clang/AST/RecursiveASTVisitor.h>
|
#include <clang/AST/RecursiveASTVisitor.h>
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
namespace clang {
|
namespace clang {
|
||||||
class NamespaceDecl;
|
class NamespaceDecl;
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ tvl::value_t paths_filter::match(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Matching source paths doesn't make sens if they are not absolute
|
// Matching source paths doesn't make sens if they are not absolute
|
||||||
if(!p.is_absolute())
|
if (!p.is_absolute())
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
auto pp = p.fs_path(root_);
|
auto pp = p.fs_path(root_);
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ void generator::generate_relationships(
|
|||||||
void generator::generate(const source_file &f, std::ostream &ostr) const
|
void generator::generate(const source_file &f, std::ostream &ostr) const
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
if (f.type() == common::model::source_file_t::kDirectory) {
|
if (f.type() == common::model::source_file_t::kDirectory) {
|
||||||
LOG_DBG("Generating directory {}", f.name());
|
LOG_DBG("Generating directory {}", f.name());
|
||||||
|
|
||||||
@@ -105,10 +104,7 @@ void generator::generate(std::ostream &ostr) const
|
|||||||
|
|
||||||
// Generate files and folders
|
// Generate files and folders
|
||||||
util::for_each_if(
|
util::for_each_if(
|
||||||
m_model,
|
m_model, [this](const auto &f) { return true; },
|
||||||
[this](const auto &f) {
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
[this, &ostr](const auto &f) {
|
[this, &ostr](const auto &f) {
|
||||||
generate(dynamic_cast<source_file &>(*f), ostr);
|
generate(dynamic_cast<source_file &>(*f), ostr);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ common::optional_ref<common::model::diagram_element> diagram::get(
|
|||||||
void diagram::add_file(std::unique_ptr<common::model::source_file> &&f)
|
void diagram::add_file(std::unique_ptr<common::model::source_file> &&f)
|
||||||
{
|
{
|
||||||
// Don't add the same file more than once
|
// Don't add the same file more than once
|
||||||
if(get_file(f->id()))
|
if (get_file(f->id()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
LOG_DBG("Adding source file: {}, {}", f->name(), f->fs_path().string());
|
LOG_DBG("Adding source file: {}, {}", f->name(), f->fs_path().string());
|
||||||
@@ -63,7 +63,7 @@ void diagram::add_file(std::unique_ptr<common::model::source_file> &&f)
|
|||||||
common::model::filesystem_path parent_path_so_far;
|
common::model::filesystem_path parent_path_so_far;
|
||||||
for (const auto &directory : f->path()) {
|
for (const auto &directory : f->path()) {
|
||||||
auto source_file_path = parent_path_so_far | directory;
|
auto source_file_path = parent_path_so_far | directory;
|
||||||
if(parent_path_so_far.is_empty())
|
if (parent_path_so_far.is_empty())
|
||||||
source_file_path = {directory};
|
source_file_path = {directory};
|
||||||
|
|
||||||
auto dir = std::make_unique<common::model::source_file>(
|
auto dir = std::make_unique<common::model::source_file>(
|
||||||
|
|||||||
@@ -52,14 +52,16 @@ public:
|
|||||||
clang::StringRef relative_path, const clang::Module *imported,
|
clang::StringRef relative_path, const clang::Module *imported,
|
||||||
clang::SrcMgr::CharacteristicKind file_type) override;
|
clang::SrcMgr::CharacteristicKind file_type) override;
|
||||||
|
|
||||||
std::optional<common::id_t> process_internal_header(const std::filesystem::path &include_path,
|
std::optional<common::id_t> process_internal_header(
|
||||||
bool is_system, const common::id_t current_file_id);
|
const std::filesystem::path &include_path, bool is_system,
|
||||||
|
const common::id_t current_file_id);
|
||||||
|
|
||||||
std::optional<common::id_t> process_external_system_header(
|
std::optional<common::id_t> process_external_system_header(
|
||||||
const std::filesystem::path &include_path,
|
const std::filesystem::path &include_path,
|
||||||
const common::id_t current_file_id);
|
const common::id_t current_file_id);
|
||||||
|
|
||||||
std::optional<common::id_t> process_source_file(const std::filesystem::path &file);
|
std::optional<common::id_t> process_source_file(
|
||||||
|
const std::filesystem::path &file);
|
||||||
|
|
||||||
clanguml::include_diagram::model::diagram &diagram()
|
clanguml::include_diagram::model::diagram &diagram()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user