Fixed t00064 on LLVM 16
This commit is contained in:
@@ -871,7 +871,7 @@ std::optional<template_parameter> template_builder::try_as_function_prototype(
|
||||
clang::QualType &type, class_ &template_instantiation,
|
||||
size_t argument_index)
|
||||
{
|
||||
auto *function_type = type->getAs<clang::FunctionProtoType>();
|
||||
const auto *function_type = type->getAs<clang::FunctionProtoType>();
|
||||
|
||||
if (function_type == nullptr && type->isFunctionPointerType()) {
|
||||
function_type =
|
||||
@@ -915,10 +915,10 @@ std::optional<template_parameter> template_builder::try_as_function_prototype(
|
||||
}
|
||||
|
||||
std::optional<template_parameter> template_builder::try_as_decl_type(
|
||||
std::optional<clanguml::class_diagram::model::class_ *> &parent,
|
||||
const clang::NamedDecl *cls, const clang::TemplateDecl *template_decl,
|
||||
clang::QualType &type, class_ &template_instantiation,
|
||||
size_t argument_index)
|
||||
std::optional<clanguml::class_diagram::model::class_ *> & /*parent*/,
|
||||
const clang::NamedDecl * /*cls*/,
|
||||
const clang::TemplateDecl * /*template_decl*/, clang::QualType &type,
|
||||
class_ & /*template_instantiation*/, size_t /*argument_index*/)
|
||||
{
|
||||
const auto *decl_type =
|
||||
common::dereference(type)->getAs<clang::DecltypeType>();
|
||||
|
||||
@@ -1610,7 +1610,7 @@ bool translation_unit_visitor::find_relationships(const clang::QualType &type,
|
||||
|
||||
void translation_unit_visitor::process_function_parameter(
|
||||
const clang::ParmVarDecl &p, class_method &method, class_ &c,
|
||||
const std::set<std::string> &template_parameter_names)
|
||||
const std::set<std::string> & /*template_parameter_names*/)
|
||||
{
|
||||
method_parameter parameter;
|
||||
parameter.set_name(p.getNameAsString());
|
||||
|
||||
@@ -64,11 +64,18 @@ TEST_CASE("t00064", "[test-case][class]")
|
||||
"It,type_list<First...>,type_list<Second...>"));
|
||||
REQUIRE_THAT(
|
||||
puml, (IsMethod<Public>("get", "ref_t", "unsigned int i")));
|
||||
#if LLVM_VERSION_MAJOR < 16
|
||||
REQUIRE_THAT(puml,
|
||||
(IsMethod<Public>("getp", "value_type const*", "unsigned int i")));
|
||||
REQUIRE_THAT(puml,
|
||||
(IsMethod<Public>("find", "unsigned int", "value_type const& v")));
|
||||
#else
|
||||
REQUIRE_THAT(puml,
|
||||
(IsMethod<Public>("getp", "const value_type *", "unsigned int i")));
|
||||
REQUIRE_THAT(puml,
|
||||
(IsMethod<Public>("find", "unsigned int", "const value_type & v")));
|
||||
|
||||
#endif
|
||||
save_puml(
|
||||
config.output_directory() + "/" + diagram->name + ".puml", puml);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user