Compare commits
3 Commits
v0.4.1
...
fix-gcc13-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7cf61a98aa | ||
|
|
79801b2936 | ||
|
|
57bc2f7309 |
@@ -3,6 +3,7 @@ output_directory: docs/diagrams
|
||||
comment_parser: clang
|
||||
remove_compile_flags:
|
||||
- -Wno-class-memaccess
|
||||
- -Wno-dangling-reference
|
||||
generate_links:
|
||||
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 %}"
|
||||
|
||||
@@ -136,14 +136,21 @@ endif()
|
||||
# Setup custom compile options depending on various compiler
|
||||
# and environment quirks
|
||||
#
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "13.0")
|
||||
# Workaround over Wdangling-reference false positives in libfmt
|
||||
set(CUSTOM_COMPILE_OPTIONS ${CUSTOM_COMPILE_OPTIONS} -Wno-dangling-reference)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(LLVM_VERSION_MAJOR GREATER_EQUAL 17)
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
set(CUSTOM_COMPILE_OPTIONS "-Wno-class-memaccess")
|
||||
set(CUSTOM_COMPILE_OPTIONS ${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")
|
||||
${CUSTOM_COMPILE_OPTIONS} -Wno-unused-private-field)
|
||||
endif()
|
||||
|
||||
#
|
||||
@@ -219,4 +226,4 @@ option(BUILD_TESTS "" ON)
|
||||
if(BUILD_TESTS)
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
endif(BUILD_TESTS)
|
||||
endif(BUILD_TESTS)
|
||||
|
||||
@@ -238,6 +238,11 @@ std::string to_string(const clang::Expr *expr)
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string to_string(const clang::ValueDecl *val)
|
||||
{
|
||||
return val->getQualifiedNameAsString();
|
||||
}
|
||||
|
||||
std::string to_string(const clang::Stmt *stmt)
|
||||
{
|
||||
const clang::LangOptions lang_options;
|
||||
|
||||
@@ -111,6 +111,8 @@ std::string to_string(
|
||||
|
||||
std::string to_string(const clang::Expr *expr);
|
||||
|
||||
std::string to_string(const clang::ValueDecl *val);
|
||||
|
||||
std::string to_string(const clang::Stmt *stmt);
|
||||
|
||||
std::string to_string(const clang::FunctionTemplateDecl *decl);
|
||||
|
||||
@@ -76,7 +76,7 @@ clang::ASTContext *call_expression_context::get_ast_context() const
|
||||
}
|
||||
|
||||
if (current_method_decl_ != nullptr) {
|
||||
return ¤t_function_decl_->getASTContext();
|
||||
return ¤t_method_decl_->getASTContext();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
||||
@@ -1601,11 +1601,20 @@ bool translation_unit_visitor::process_template_parameters(
|
||||
clang::dyn_cast_or_null<clang::TemplateTemplateParmDecl>(
|
||||
parameter);
|
||||
std::optional<std::string> default_arg;
|
||||
if (template_template_parameter->hasDefaultArgument())
|
||||
default_arg = common::to_string(
|
||||
if (template_template_parameter->hasDefaultArgument()) {
|
||||
const auto &def_arg =
|
||||
template_template_parameter->getDefaultArgument()
|
||||
.getArgument()
|
||||
.getAsExpr());
|
||||
.getArgument();
|
||||
if (def_arg.getKind() ==
|
||||
clang::TemplateArgument::ArgKind::Expression) {
|
||||
default_arg = common::to_string(def_arg.getAsExpr());
|
||||
}
|
||||
else if (def_arg.getKind() ==
|
||||
clang::TemplateArgument::ArgKind::Declaration) {
|
||||
default_arg = common::to_string(def_arg.getAsDecl());
|
||||
}
|
||||
}
|
||||
|
||||
auto ct = template_parameter::make_template_template_type(
|
||||
template_template_parameter->getNameAsString(), default_arg,
|
||||
template_template_parameter->isParameterPack());
|
||||
|
||||
Reference in New Issue
Block a user