Skip to content

-Wdocumentation should ignore period after \param. #46607

@JDevlieghere

Description

@JDevlieghere
Bugzilla Link 47263
Version unspecified
OS All
CC @gribozavr,@zygoloid

Extended Description

Consider the following example:

/// Sentence that ends with \param bar.
int foo(int bar) { }

When compiled with -Wdocumentation this results in warning:

$ clang -c -Wdocumentation /tmp/repro.c
/tmp/repro.c:1:39: warning: empty paragraph passed to '\param' command [-Wdocumentation]
/// Sentence that ends with \param bar.
                            ~~~~~~~~~~^
/tmp/repro.c:1:36: warning: parameter 'bar.' not found in the function declaration [-Wdocumentation]
/// Sentence that ends with \param bar.
                                   ^~~~
/tmp/repro.c:1:36: note: did you mean 'bar'?
/// Sentence that ends with \param bar.
                                   ^~~~
                                   bar

This is silly and particularly annoying for projects such as LLVM that require comments to be sentences terminated with a period.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions