This is an archive of the discontinued LLVM Phabricator instance.

[clang-format][doc] Correct typos
ClosedPublic

Authored by sstwcw on Aug 23 2023, 9:07 PM.

Details

Summary

I ran the script for dumping the format style options before committing
16ccba51072b just in case. It turned out that the 2 files didn't matchc
any more due to an attempt at fixing typos.

Diff Detail

Event Timeline

sstwcw created this revision.Aug 23 2023, 9:07 PM
Herald added projects: Restricted Project, Restricted Project, Restricted Project. · View Herald TranscriptAug 23 2023, 9:07 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
sstwcw requested review of this revision.Aug 23 2023, 9:07 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

owenpan accepted this revision.Aug 23 2023, 10:42 PM
owenpan added inline comments.
clang/docs/ClangFormatStyleOptions.rst
5100

11e2975810acd fixed the typo betwee here while it should have fixed it in Format.h instead.

clang/include/clang/Format/Format.h
4018

Or to be more precise: put a space between a control statement keyword (for/if/while) and the opening parenthesis that follows.

This revision is now accepted and ready to land.Aug 23 2023, 10:42 PM
This revision was landed with ongoing or failed builds.Aug 26 2023, 6:57 AM
This revision was automatically updated to reflect the committed changes.