.. note-warning:: Doxygen patches
Current stable Doxygen release (1.8.15) doesn't correctly provide location
- information for function and variable declarations. A fix is submitted in
- :gh:`doxygen/doxygen#6722`, which is not integrated yet.
+ information for function and variable declarations. A fix is present since
+ :gh:`doxygen/doxygen@7f40e488e27bcea4bb15045df05479dc5fbd9d6d` (formerly
+ :gh:`doxygen/doxygen#6722`).
`Code highlighting`_
--------------------
# or a module
include = None
if state.current_kind in ['namespace', 'group']:
- file = element.find('location').attrib['file']
+ location_attribs = element.find('location').attrib
+ file = location_attribs['declfile'] if 'declfile' in location_attribs else location_attribs['file']
include = make_include(state, file)
# If the include for current namespace is not yet set (empty string)
# namespaces without any members too.
state.current_kind = compound.kind
if compound.kind in ['struct', 'class', 'union'] or (compound.kind == 'namespace' and compounddef.find('innerclass') is None and compounddef.find('innernamespace') is None and compounddef.find('sectiondef') is None):
- file = compounddef.find('location').attrib['file']
+ location_attribs = compounddef.find('location').attrib
+ file = location_attribs['declfile'] if 'declfile' in location_attribs else location_attribs['file']
compound.include = make_include(state, file)
# Save include for current compound. Every enum/var/function/... parser