From b06df5baedd5a86b348a1bdc46f582ead7c3cb4a Mon Sep 17 00:00:00 2001 From: Jakob Lykke Andersen Date: Thu, 5 Aug 2021 10:40:23 +0200 Subject: [PATCH] Fix doxygenfunction for named function pointers. Fixes michaeljones/breathe#722 --- breathe/directives/function.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/breathe/directives/function.py b/breathe/directives/function.py index fbfd834f..f48a0093 100644 --- a/breathe/directives/function.py +++ b/breathe/directives/function.py @@ -140,7 +140,11 @@ def _parse_args(self, function_description: str) -> Optional[cpp.ASTParametersQu continue declarator = p.arg.type.decl while hasattr(declarator, 'next'): - declarator = declarator.next # type: ignore + if isinstance(declarator, cpp.ASTDeclaratorParen): + assert hasattr(declarator, 'inner') + declarator = declarator.inner # type: ignore + else: + declarator = declarator.next # type: ignore assert hasattr(declarator, 'declId') declarator.declId = None # type: ignore p.arg.init = None # type: ignore