From 56f175a886e5644da265b175f4ff6bf1e2fab2c4 Mon Sep 17 00:00:00 2001 From: alandefreitas Date: Thu, 2 Jan 2025 14:37:11 -0300 Subject: [PATCH] populating Record maintains base classes #fix --- example/external/url/mrdocs.yml | 3 +++ src/lib/AST/ASTVisitor.cpp | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/example/external/url/mrdocs.yml b/example/external/url/mrdocs.yml index 7e8603de0..a3d27a41f 100644 --- a/example/external/url/mrdocs.yml +++ b/example/external/url/mrdocs.yml @@ -30,6 +30,9 @@ see-below: - 'boost::urls::grammar::see_below' - 'boost::urls::string_token::see_below' +# Metadata Extraction +private-bases: false + # Generator generate: adoc base-url: https://www.github.com/boostorg/url/blob/develop/include/ # boost/url/url_view.hpp diff --git a/src/lib/AST/ASTVisitor.cpp b/src/lib/AST/ASTVisitor.cpp index c5442f075..380b61c23 100644 --- a/src/lib/AST/ASTVisitor.cpp +++ b/src/lib/AST/ASTVisitor.cpp @@ -896,14 +896,14 @@ populate( // Extract direct bases. D->bases() will get the bases // from whichever declaration is the definition (if any) - if(D->hasDefinition()) + if(D->hasDefinition() && I.Bases.empty()) { for (const CXXBaseSpecifier& B : D->bases()) { AccessSpecifier const access = B.getAccessSpecifier(); if (!config_->privateBases && - access == AccessSpecifier::AS_private) + access == AS_private) { continue; }