This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Add note directive generation for docs
ClosedPublic

Authored by gedare on Jul 5 2023, 3:24 PM.

Details

Summary

Generate a ..note:: directive when the \note is encountered in Format.h

Diff Detail

Event Timeline

gedare created this revision.Jul 5 2023, 3:24 PM
Herald added projects: Restricted Project, Restricted Project, Restricted Project. · View Herald TranscriptJul 5 2023, 3:24 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
gedare requested review of this revision.Jul 5 2023, 3:24 PM
NOTE: Clang-Format Team Automated Review Comment

It looks like your clang-format review does not contain any unit tests, please try to ensure all code changes have a unit test (unless this is an NFC or refactoring, adding documentation etc..)

Add your unit tests in clang/unittests/Format and you can build with ninja FormatTests. We recommend using the verifyFormat(xxx) format of unit tests rather than EXPECT_EQ as this will ensure you change is tolerant to random whitespace changes (see FormatTest.cpp as an example)

For situations where your change is altering the TokenAnnotator.cpp which can happen if you are trying to improve the annotation phase to ensure we are correctly identifying the type of a token, please add a token annotator test in TokenAnnotatorTest.cpp

gedare updated this revision to Diff 537872.Jul 6 2023, 1:53 PM

Update from D153205

Can you attach a screenshot of how the new note section would look like?

gedare added a comment.Jul 7 2023, 6:46 PM

It looks like this:

owenpan accepted this revision.Jul 7 2023, 8:58 PM
This revision is now accepted and ready to land.Jul 7 2023, 8:58 PM
MyDeveloperDay accepted this revision.Jul 9 2023, 6:37 AM
This revision was landed with ongoing or failed builds.Jul 9 2023, 12:25 PM
This revision was automatically updated to reflect the committed changes.