[LLVMbugs] [Bug 13686] New: -Wdocumentation warns about @return of struct not yet declared

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Aug 24 01:09:48 PDT 2012


             Bug #: 13686
           Summary: -Wdocumentation warns about @return of struct not yet
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: magnus.reftel at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 9105
  --> http://llvm.org/bugs/attachment.cgi?id=9105
Reduced testcase

-Wdocumentation warns about @return on a declaration of a function that returns
a struct that is not declared at the site of the function declaration, but is
declared later. The warning is the following:

test.c:6:6: warning: '\return' command used in a comment that is not attached
      a function or method declaration [-Wdocumentation]
/** @return s */
1 warning generated.

A reduced testcase (also attached) is:

/* Enabling this makes the warning go away. */
#if 0
struct s;

/** @return s */
struct s* f(void);

/* Disabling this makes the warning go away. */
#if 1
struct s;

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list