sphinx-doc / sphinx-doc/sphinx

Exception occured while build help

Open
#8,186 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

domains:cpp type:enhancement
Dominant language
Python
Stars
8k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Following callstack can be seen. It seems it has problems with Q_DECL_CONSTEXPR:

Exception occurred:
File "c:\program files (x86)\python38-32\lib\site-packages\sphinx\domains\cpp.py", line 6126, in _parse_type
raise self._make_multi_error(prevErrors, header) from exTyped
sphinx.util.cfamily.DefinitionError: Error when parsing function declaration.
If the function has no return type:
Error in declarator or parameters-and-qualifiers
Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 133]
template<typename SourceType, typename DestType, typename Rep = typename DestType::result_type, typename ValueType> Q_DECL_CONSTEXPR Rep convert (ValueType value)
-------------------------------------------------------------------------------------------------------------------------------------^
If the function has a return type:
Error in declarator or parameters-and-qualifiers
If pointer to member declarator:
Invalid C++ declaration: Expected '::' in pointer to member (function). [error at 137]
template<typename SourceType, typename DestType, typename Rep = typename DestType::result_type, typename ValueType> Q_DECL_CONSTEXPR Rep convert (ValueType value)
-----------------------------------------------------------------------------------------------------------------------------------------^
If declarator-id:
Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 137]
template<typename SourceType, typename DestType, typename Rep = typename DestType::result_type, typename ValueType> Q_DECL_CONSTEXPR Rep convert (ValueType value)
-----------------------------------------------------------------------------------------------------------------------------------------^
The full traceback has been saved in C:\Users\roebst2\AppData\Local\Temp\sphinx-err-k_qy8m52.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at https://github.com/sphinx-doc/sphinx/issues. Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in sphinx/domains/cpp.py at _parse_type and reproduce the help build using the reported declaration containing Q_DECL_CONSTEXPR. Trace why this declaration fails to parse, then verify that the build completes without the reported Sphinx exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.