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

A friend function inside a class raises a warning and is not documented #39

Closed
qukhan opened this issue Aug 19, 2016 · 2 comments
Closed

Comments

@qukhan
Copy link

qukhan commented Aug 19, 2016

A friend declaration raises the following warning:

[warning] when parsing '' (file:line): Unknown cursor kind 'UnexposedDecl'

If the definition is inline, the function's documentation is not extracted.

Example:

/** A test class */
struct Test {
    /** A sample friend function */
    friend void foo();
};
@foonathan foonathan added the bug label Aug 19, 2016
@foonathan
Copy link
Collaborator

Yes, that is a libclang limitation.

@foonathan
Copy link
Collaborator

I've managed to fix it on develop.

It will silently ignore all friend declarations (as they are implementation details) unless they are friend function definitions as they create a new function.

I.e.:

/// Foo.
struct foo
{
  // ignored
  friend struct bar;

  // ignored
  friend void foo();

  /// Documented.
  friend void swap(foo& a, foo& b)
  {
     // ...
  }
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants