31#include <clang/AST/Comment.h>
32#include <clang/AST/Expr.h>
33#include <clang/AST/RawCommentList.h>
34#include <clang/Basic/Module.h>
35#include <clang/Basic/SourceManager.h>
46 std::tuple<eid_t, common::model::relationship_t, const clang::Decl *>>;
67 clang::SourceManager &sm, DiagramT &
diagram,
const ConfigT &
config)
96 const std::filesystem::path &
tu_path()
const
170 if (
const clang::Module *module = decl.getOwningModule();
172 std::string module_name = module->Name;
173 bool is_private{
false};
174#if LLVM_VERSION_MAJOR < 15
175 is_private = module->Kind ==
176 clang::Module::ModuleKind::PrivateModuleFragment;
178 is_private = module->isPrivateModule();
182 module_name = module->getTopLevelModule()->Name;
190 std::unique_ptr<common::model::template_element> element)
207 auto *comment = decl.getASTContext().getRawCommentForDeclNoCache(&decl);
221 const clang::RawComment *comment, clang::DiagnosticsEngine &de,
224 if (comment ==
nullptr)
235 const auto &[decorators, stripped_comment] =
240 return stripped_comment;
245 return !
config().include_system_headers() &&
247 decl->getSourceRange().getBegin());
267 auto should_include_namespace =
diagram().should_include(
270 const auto decl_file =
273 const auto should_include_decl_file =
diagram().should_include(
276 return should_include_namespace && should_include_decl_file;
308 std::string file_path;
313 file_location, file_path, line, column))
316 return file_location;