[llvm-branch-commits] [clang] a0e885e - Added docs for EmptyLineAfterFunctionDefinition

Konrad Kleine via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Nov 22 12:33:27 PST 2021


Author: Konrad Kleine
Date: 2021-11-22T20:30:31Z
New Revision: a0e885ea1b01efb5db5479ab8f83217c6085bf66

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

LOG: Added docs for EmptyLineAfterFunctionDefinition

Added: 
    

Modified: 
    clang/docs/ClangFormatStyleOptions.rst

Removed: 
    


################################################################################
diff  --git a/clang/docs/ClangFormatStyleOptions.rst b/clang/docs/ClangFormatStyleOptions.rst
index 0c43429fda03c..f5e635114d716 100644
--- a/clang/docs/ClangFormatStyleOptions.rst
+++ b/clang/docs/ClangFormatStyleOptions.rst
@@ -2310,6 +2310,27 @@ the configuration (without a prefix: ``Auto``).
       };
 
 
+**EmptyLineAfterFunctionDefinition** (``EmptyLineAfterFunctionDefinitionStyle``) :versionbadge:`clang-format 14`
+  Defines when to put an empty line after a function definition.
+
+  Possible values:
+
+  * ``ELAFDS_Leave`` (in configuration: ``Leave``)
+    Keep existing empty lines after function definition.
+    MaxEmptyLinesToKeep is applied instead.
+
+  * ``ELAFDS_Always`` (in configuration: ``Always``)
+    Always add empty line after function definition if there are none.
+    MaxEmptyLinesToKeep is applied also.
+
+    .. code-block:: c++
+
+      void one() {}
+      
+      void two() {}
+      
+      void three() {}
+
 
 **ExperimentalAutoDetectBinPacking** (``Boolean``) :versionbadge:`clang-format 3.7`
   If ``true``, clang-format detects whether function calls and


        


More information about the llvm-branch-commits mailing list