sstwcw created this revision.
Herald added projects: All, clang, clang-format.
Herald added a subscriber: cfe-commits.
Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay.
sstwcw requested review of this revision.
Herald added a comment.
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`
I ran the script for dumping the format style options before committing
16ccba51072b
<https://reviews.llvm.org/rG16ccba51072bbc5ff4c66f91f939163dc91e5d96> just in
case. It turned out that the 2 files didn't matchc
any more due to an attempt at fixing typos.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D158697
Files:
clang/docs/ClangFormatStyleOptions.rst
clang/include/clang/Format/Format.h
Index: clang/include/clang/Format/Format.h
===================================================================
--- clang/include/clang/Format/Format.h
+++ clang/include/clang/Format/Format.h
@@ -971,13 +971,13 @@
/// For example:
/// \code
/// x = (char *__capability)&y;
- /// int function(void) __ununsed;
+ /// int function(void) __unused;
/// void only_writes_to_buffer(char *__output buffer);
/// \endcode
///
/// In the .clang-format configuration file, this can be configured like:
/// \code{.yaml}
- /// AttributeMacros: ['__capability', '__output', '__ununsed']
+ /// AttributeMacros: ['__capability', '__output', '__unused']
/// \endcode
///
/// \version 12
@@ -4043,7 +4043,7 @@
/// AfterFunctionDefinitionName: true
/// \endcode
struct SpaceBeforeParensCustom {
- /// If ``true``, put space betwee control statement keywords
+ /// If ``true``, put space between control statement keywords
/// (for/if/while...) and opening parentheses.
/// \code
/// true: false:
Index: clang/docs/ClangFormatStyleOptions.rst
===================================================================
--- clang/docs/ClangFormatStyleOptions.rst
+++ clang/docs/ClangFormatStyleOptions.rst
@@ -1549,14 +1549,14 @@
.. code-block:: c++
x = (char *__capability)&y;
- int function(void) __ununsed;
+ int function(void) __unused;
void only_writes_to_buffer(char *__output buffer);
In the .clang-format configuration file, this can be configured like:
.. code-block:: yaml
- AttributeMacros: ['__capability', '__output', '__ununsed']
+ AttributeMacros: ['__capability', '__output', '__unused']
.. _BinPackArguments:
Index: clang/include/clang/Format/Format.h
===================================================================
--- clang/include/clang/Format/Format.h
+++ clang/include/clang/Format/Format.h
@@ -971,13 +971,13 @@
/// For example:
/// \code
/// x = (char *__capability)&y;
- /// int function(void) __ununsed;
+ /// int function(void) __unused;
/// void only_writes_to_buffer(char *__output buffer);
/// \endcode
///
/// In the .clang-format configuration file, this can be configured like:
/// \code{.yaml}
- /// AttributeMacros: ['__capability', '__output', '__ununsed']
+ /// AttributeMacros: ['__capability', '__output', '__unused']
/// \endcode
///
/// \version 12
@@ -4043,7 +4043,7 @@
/// AfterFunctionDefinitionName: true
/// \endcode
struct SpaceBeforeParensCustom {
- /// If ``true``, put space betwee control statement keywords
+ /// If ``true``, put space between control statement keywords
/// (for/if/while...) and opening parentheses.
/// \code
/// true: false:
Index: clang/docs/ClangFormatStyleOptions.rst
===================================================================
--- clang/docs/ClangFormatStyleOptions.rst
+++ clang/docs/ClangFormatStyleOptions.rst
@@ -1549,14 +1549,14 @@
.. code-block:: c++
x = (char *__capability)&y;
- int function(void) __ununsed;
+ int function(void) __unused;
void only_writes_to_buffer(char *__output buffer);
In the .clang-format configuration file, this can be configured like:
.. code-block:: yaml
- AttributeMacros: ['__capability', '__output', '__ununsed']
+ AttributeMacros: ['__capability', '__output', '__unused']
.. _BinPackArguments:
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits