<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - -Wdocumentation doesn't let one document function pointers in a struct"
   href="https://bugs.llvm.org/show_bug.cgi?id=32667">32667</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>-Wdocumentation doesn't let one document function pointers in a struct
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>4.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>gpakosz@pempek.net
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Hello,

Our headers contain struct definitions with function pointers. These structs
are semantically interfaces we want to document. There are many, hence we don't
typedef things (which clang supports).

struct X
{
  /**
   * Foo!
   *
   * @param i an integer.
   * @return another integer.
   */
  int (*foo)(int i);
};

int main()
{
  return 0;
}

This sample warns with:
<main.c>:6:7: warning: '\param' command used in a comment that is not attached
to a function declaration [-Wdocumentation]
   * @param i an integer.
      ^~~~~
<main.c>:7:7: warning: '\return' command used in a comment that is not attached
to a function or method declaration [-Wdocumentation]
   * @return another integer.
     ~^~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
Compiler exited with result code 0

It seems that since 3.2, clang never supported documenting function pointers
inside structs.

You can see it in action here: <a href="https://godbolt.org/g/zXkigH">https://godbolt.org/g/zXkigH</a>

Thanks for reading,
G.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>