[clang] 1d0061f - [clang-format][doc] Correct typos

via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 26 06:57:23 PDT 2023


Author: sstwcw
Date: 2023-08-26T13:55:21Z
New Revision: 1d0061fc5e1fe68f34135a6d9520bde4679b43db

URL: https://github.com/llvm/llvm-project/commit/1d0061fc5e1fe68f34135a6d9520bde4679b43db
DIFF: https://github.com/llvm/llvm-project/commit/1d0061fc5e1fe68f34135a6d9520bde4679b43db.diff

LOG: [clang-format][doc] Correct typos

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 since 11e2975810acd due to an attempt at fixing typos.

Reviewed By: owenpan

Differential Revision: https://reviews.llvm.org/D158697

Added: 
    

Modified: 
    clang/docs/ClangFormatStyleOptions.rst
    clang/include/clang/Format/Format.h

Removed: 
    


################################################################################
diff  --git a/clang/docs/ClangFormatStyleOptions.rst b/clang/docs/ClangFormatStyleOptions.rst
index 3b3f6f2860906a..7847f6aa5fb1c9 100644
--- a/clang/docs/ClangFormatStyleOptions.rst
+++ b/clang/docs/ClangFormatStyleOptions.rst
@@ -1549,14 +1549,14 @@ the configuration (without a prefix: ``Auto``).
   .. 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:
 

diff  --git a/clang/include/clang/Format/Format.h b/clang/include/clang/Format/Format.h
index 192cc68e51fad7..eb47715e71ca01 100644
--- a/clang/include/clang/Format/Format.h
+++ b/clang/include/clang/Format/Format.h
@@ -971,13 +971,13 @@ struct FormatStyle {
   /// 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
@@ -4015,7 +4015,7 @@ struct FormatStyle {
   ///     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:


        


More information about the cfe-commits mailing list