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

Remove spurious "typedef" in type declaration when using "using" #424

Merged
merged 1 commit into from
Mar 15, 2019

Conversation

tristan0x
Copy link

Remove the spurious "typedef " on right hand side added
by Doxygen observed when type is declared inside a namespace
See examples/specific/using_in_ns

//
// When declaring a type using a "using" directive inside a namespace,
// Doxygen adds a spurious "typedef" in the corresponding XML definition
//
// $ doxygen --version
// 1.8.11
//

namespace foo {
using foo_int = int; // <definition>using foo::foo_int = typedef int</definition>
}

using global_int = int; // <definition>using global_int =  int</definition>

It fixes warnings issued by Sphinx when processing the docstring:

/path/to/using_in_ns.rst:10: WARNING: Error in type declaration.
If typedef-like declaration:
  Type must be either just a name or a typedef-like declaration.
  If just a name:
    Invalid definition: Expected end of definition. [error at 19]
      foo::foo_int = typedef int
  • The extra "typedef" has been observed in XML written by Doxygen 1.8.11
  • The warning above has been observed with Sphinx 1.8.5

Remove the spurious "typedef " on right hand side added
by Doxygen observed when type is declared inside a namespace
See examples/specific/using_in_ns

```cpp
//
// When declaring a type using a "using" directive inside a namespace,
// Doxygen adds a spurious "typedef" in the corresponding XML definition
//
// $ doxygen --version
// 1.8.11
//

namespace foo {
using foo_int = int; // <definition>using foo::foo_int = typedef int</definition>
}

using global_int = int; // <definition>using global_int =  int</definition>
```

It fixes warnings issued by Sphinx when processing the docstring:
```
/path/to/using_in_ns.rst:10: WARNING: Error in type declaration.
If typedef-like declaration:
  Type must be either just a name or a typedef-like declaration.
  If just a name:
    Invalid definition: Expected end of definition. [error at 19]
      foo::foo_int = typedef int
```

* The extra "typedef" has been observed in XML written by Doxygen 1.8.11
* The warning above has been observed with Sphinx 1.8.5
@vermeeren vermeeren self-assigned this Mar 15, 2019
@vermeeren vermeeren added enhancement Improvements, additions (also cosmetics) code Source code labels Mar 15, 2019
@vermeeren
Copy link
Collaborator

Seems good to me, thanks for the patch!

@vermeeren vermeeren merged commit 94c1d98 into breathe-doc:master Mar 15, 2019
vermeeren added a commit that referenced this pull request Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Source code enhancement Improvements, additions (also cosmetics)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants