<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </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 --- - Confusing/incorrect -Wdocumentation warning message with \def used on a function"
   href="http://llvm.org/bugs/show_bug.cgi?id=16713">16713</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Confusing/incorrect -Wdocumentation warning message with \def used on a function
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>sean@rogue-research.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>-Wdocumentation found a bug, but the wording of the diagnostic is confusing and
incorrect.

This code is from libusb:

----------------------
#include <stdint.h>

/** \def libusb_le16_to_cpu
 * \ingroup misc
 * Convert a 16-bit value from little-endian to host-endian format. On
 * little endian systems, this function does nothing. On big endian systems,
 * the bytes are swapped.
 * \param x the little-endian value to convert
 * \returns the value in host-endian byte order
 */
#define libusb_le16_to_cpu libusb_cpu_to_le16

/** \def libusb_cpu_to_le16
 * \ingroup misc
 * Convert a 16-bit value from host-endian to little-endian format. On
 * little endian systems, this function does nothing. On big endian systems,
 * the bytes are swapped.
 * \param x the host-endian value to convert
 * \returns the value in little-endian byte order
 */
static inline uint16_t libusb_cpu_to_le16(const uint16_t x)
{
    union {
        uint8_t  b8[2];
        uint16_t b16;
    } _tmp;
    _tmp.b8[1] = x >> 8;
    _tmp.b8[0] = x & 0xff;
    return _tmp.b16;
}
----------------------

run clang:

$ clang -Wdocumentation test.c

test.c:13:5: warning: unknown command tag name 'def'; did you mean 'ref'?
[-Wdocumentation]
/** \def libusb_cpu_to_le16
    ^~~~
     ref

1) 'def' is not an "unknown command tag name" since it worked on line 3.
2) No, I did not mean "\ref", I meant "\fn" since the thing is a function not a
macro.</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>