From 7df2935e934eeff173170c25c7592f9b608f863a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 30 Jan 2018 12:48:38 +0100 Subject: [PATCH] doxygen: loudly ignore member groups without a \name instead of asserting. --- doxygen/dox2html5.py | 16 ++++++++++------ .../test/compound_listing/Directory/Sub/Class.h | 7 +++++++ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/doxygen/dox2html5.py b/doxygen/dox2html5.py index 045c5a86..b6309b5a 100755 --- a/doxygen/dox2html5.py +++ b/doxygen/dox2html5.py @@ -1745,12 +1745,16 @@ def parse_xml(state: State, xml: str): logging.warning("{}: unknown user-defined kind {}".format(state.current, memberdef.attrib['kind'])) if list: - group = Empty() - group.name = compounddef_child.find('header').text - group.id = slugify(group.name) - group.description = parse_desc(state, compounddef_child.find('description')) - group.members = list - compound.groups += [group] + header = compounddef_child.find('header') + if header is None: + logging.error("{}: member groups without @name are not supported, ignoring".format(state.current)) + else: + group = Empty() + group.name = header.text + group.id = slugify(group.name) + group.description = parse_desc(state, compounddef_child.find('description')) + group.members = list + compound.groups += [group] elif compounddef_child.attrib['kind'] not in ['private-type', 'private-static-func', diff --git a/doxygen/test/compound_listing/Directory/Sub/Class.h b/doxygen/test/compound_listing/Directory/Sub/Class.h index 52d468e5..9440e57f 100644 --- a/doxygen/test/compound_listing/Directory/Sub/Class.h +++ b/doxygen/test/compound_listing/Directory/Sub/Class.h @@ -85,6 +85,13 @@ class Class { /** @brief A protected variable */ std::string logger; + /** @{ */ /* Group w/o a name */ + + /** @brief A member that gets ignored because the group has no name */ + int member; + + /*@}*/ + /** @{ @name Group full of non-public stuff which should be marked as such */ /** @brief Protected flag in a group */ -- 2.30.2