Comment parsing: Specify argument numbers for some block commands
authorAaron Puchert <aaron.puchert@sap.com>
Fri, 13 May 2022 11:36:05 +0000 (13:36 +0200)
committerAaron Puchert <aaron.puchert@sap.com>
Fri, 13 May 2022 11:48:46 +0000 (13:48 +0200)
commit99d35826a043916b259a0e440a2aa5cabbad2773
treec409f4631544eec371f154947d0240d59d2d6449
parent562ce15924560d14f7062173cbdc6a9cd778e2eb
Comment parsing: Specify argument numbers for some block commands

The command traits have a member NumArgs for which all the parsing
infrastructure is in place, but no command was setting it to a value
other than 0. By doing so we get warnings when passing an empty
paragraph to \retval (the first argument is the return value, then comes
the description). We also take \xrefitem along for the ride, although as
the documentation states it's unlikely to be used directly.

Reviewed By: gribozavr2

Differential Revision: https://reviews.llvm.org/D125422
clang/include/clang/AST/CommentCommands.td
clang/test/AST/ast-dump-comment.cpp
clang/test/Sema/warn-documentation.cpp