[llvm-bugs] [Bug 32909] New: -fcomment-block-commands wrongly assumes that those commands take paragraphs as arguments

via llvm-bugs llvm-bugs at lists.llvm.org
Wed May 3 07:59:30 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=32909

            Bug ID: 32909
           Summary: -fcomment-block-commands wrongly assumes that those
                    commands take paragraphs as arguments
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: m-llvm at bodyfour.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 18403
  --> https://bugs.llvm.org/attachment.cgi?id=18403&action=edit
Trivial C program with some doxygen commands clang doesn't recognize by default

There are already some open bugs about how -Wdocumentation-unknown-command
isn't well-sycned with the current list of doxygen commands (#17437, #19581,
maybe others?)  A work around for this is to list them as "local" commands via
-fcomment-block-commands.

However, this doesn't work for commands that *don't* take arguments.  For
instance, this simple case including some normal doxygen commands that clang
doesn't recognize out-of-the box (@file, at cond, at endcond)

/**
 * @file    test-comment-block-commands.c
 *
 * @brief   Stuff here
 *
 * @cond    FOO
 * @note    Something
 * @endcond
 */

extern int a;
int a = 99;

If you compile with:
  $ clang -Wdocumentation -Wdocumentation-unknown-command
-fcomment-block-commands=file,cond,endcond -fsyntax-only
test-comment-block-commands.c

You get the bogus warning:
  test-comment-block-commands.c:8:12: warning: empty paragraph passed to
'@endcond' command [-Wdocumentation]

There are lots of doxygen commands that don't take arguments, so
"-fcomment-block-commands" shouldn't be making assumptions about what type of
arguments such a command would take.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170503/7bcef35b/attachment.html>


More information about the llvm-bugs mailing list