chiark / gitweb /
doxygen: loudly ignore member groups without a \name instead of asserting.
authorVladimír Vondruš <mosra@centrum.cz>
Tue, 30 Jan 2018 11:48:38 +0000 (12:48 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Tue, 30 Jan 2018 11:48:38 +0000 (12:48 +0100)
doxygen/dox2html5.py
doxygen/test/compound_listing/Directory/Sub/Class.h

index 045c5a86bfd5d49dd4a93184d5e8c004877a223d..b6309b5a78edf8d03cc2f34af3fa3c87b18f70c2 100755 (executable)
@@ -1745,12 +1745,16 @@ def parse_xml(state: State, xml: str):
                         logging.warning("{}: unknown user-defined <memberdef> 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',
index 52d468e5769e93104518eb85591ef82d3d38745b..9440e57f3dfdc838d708e5ed4f5d5509c6fbb236 100644 (file)
@@ -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 */