Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++, crash on certain duplicate declarations #8270

Closed
jakobandersen opened this issue Oct 3, 2020 · 1 comment
Closed

C++, crash on certain duplicate declarations #8270

jakobandersen opened this issue Oct 3, 2020 · 1 comment
Assignees
Milestone

Comments

@jakobandersen
Copy link
Contributor

Describe the bug
When a function is added after another entity with the same name is added they can erroneously co-exist. When adding a third non-function entity with the same name, Sphinx crashes:

Exception occurred:
  File "/home/jla/repos/sphinx/sphinx/domains/cpp.py", line 4354, in _add_symbols
    assert len(withDecl) <= 1
AssertionError

To Reproduce
Steps to reproduce the behavior:

.. cpp:struct:: A
.. cpp:function:: void A()
.. cpp:struct:: A

Expected behavior
A warning about duplicate declaration should be given for line 2 and 3.

@jakobandersen
Copy link
Contributor Author

Fixes in the 3.2.x branch.

shimizukawa pushed a commit to shimizukawa/sphinx that referenced this issue Oct 3, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant