This is an archive of the discontinued LLVM Phabricator instance.

Comment parsing: Complete list of Doxygen commands
ClosedPublic

Authored by aaronpuchert on Oct 5 2021, 3:27 PM.

Details

Summary

These should be all the commands from [1] except those that are marked
obsolete, and "link" / "endlink", as that conflicts with the existing
HeaderDoc pair "link / "/link". For some commands we don't have the
ideal category, but it should work good enough for most cases.

There seems to be no existing test for most commands (except the ones
interpreted by -Wdocumentation), and to some extent such a test wouldn't
look very interesting. But I added a test for the correct parsing of
formulas, as they're a bit special. And I had to adapt
comment-lots-of-unknown-commands.c because typo correction was kicking
in and recognizing some of the commands.

This should fix a couple of reported bugs: PR17437, PR19581, PR24062
(partially, no diagnostic for matching cond/endcond), PR32909, PR37813,
PR44243 (partially, email@domain.com must be addressed separately).

[1] https://www.doxygen.nl/manual/commands.html

Diff Detail

Event Timeline

aaronpuchert created this revision.Oct 5 2021, 3:27 PM
aaronpuchert requested review of this revision.Oct 5 2021, 3:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 5 2021, 3:27 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Also support \ifnot but give up on treating \if/\endif as VerbatimBlockCommand. That's not meaningful anyway if we don't understand \else or \endif.

gribozavr2 accepted this revision.Nov 8 2021, 2:34 AM

Sorry for the delayed response! LGTM modulo the unit test comment. Please let me know if you don't have commit access and you need me to push on your behalf.

clang/lib/AST/CommentLexer.cpp
399

Please add adjust the unit test: clang/unittests/AST/CommentLexer.cpp (TEST_F(CommentLexerTest, VerbatimBlock9))

This revision is now accepted and ready to land.Nov 8 2021, 2:34 AM
This revision was automatically updated to reflect the committed changes.
aaronpuchert marked an inline comment as done.