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

Doxygen parser confused by C++11 attributes (Origin: bugzilla #759281) #5913

doxygen opened this Issue Jul 2, 2018 · 0 comments


None yet
1 participant
Copy link

doxygen commented Jul 2, 2018

status RESOLVED severity normal in component general for ---
Reported in version 1.8.10 on platform Other
Assigned to: Dimitri van Heesch

On 2015-12-10 00:27:39 +0000, Jonathan Wakely wrote:

Doxygen doesn't have any way to document unnamed parameters, but giving them a name leads to compiler warnings. An obvious solution is to name the parameter but mark it unused, but doxygen can't cope with that either:

/// S is a class
struct S
/** @brief blah blah

  • @param i an unused argument
    void f(int i [[gnu:unused]]) { }

/tmp/doxygen/include/un.cpp:4: warning: argument 'i' of command @param is not found in the argument list of S::f(int i][[gnu:unused])

There's no warning if the code looks like this:

void f(int [[gnu:unused]] i) { }

But that's not the right syntax, because there the attribute applies to the type, not the parameter.

Again, Doxygen should use a conforming parser such as libclang, rather than maintaining its own.

On 2015-12-13 12:17:33 +0000, Dimitri van Heesch wrote:

I'll add support for C++11 style attributes.
Should be fixed in the next GIT update.

I agree that using libclang for C++ parser support would be an improvement, but it is not so easy and the last time I looked the API had blocking limitations (partial code parsing, macros, typedef handling...)

On 2015-12-30 10:19:22 +0000, Dimitri van Heesch wrote:

This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.11. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant (preferably in the form of a self-contained example).

On 2016-09-30 19:07:55 +0000, Thomas Braun wrote:

What happens with the C++11 attribute? Is it stored in e.g the XML output? I'd like to include it in the output.

$cat test.h
[[ threadsafe ]] MyFunc();

echo "GENERATE_XML = YES" | doxygen -


test.h MyFunc () MyFunc [[threadsafe]]MyFunc();

@doxygen doxygen closed this Jul 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.