[clang] [clang-format] Separate License text and include blocks (PR #77918)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 19 11:47:36 PST 2024


================
@@ -2459,6 +2459,52 @@ struct FormatStyle {
   /// \version 12
   EmptyLineBeforeAccessModifierStyle EmptyLineBeforeAccessModifier;
 
+  /// \brief Number of lines after includes.
+  /// If set, determines the number of lines to insert after includes.
+  /// Limited by MaxEmptyLinesToKeep.
+  /// Example:
+  /// EmptyLinesAfterIncludes = 1
+  /// \code
+  ///    #include <string>
+  ///    #include <map>
+  ///
+  ///    class Test {};
+  ///
+  /// \endcode
+  /// vs EmptyLinesAfterIncludes = 2
+  /// \code
+  ///    #include <string>
+  ///    #include <map>
+  ///
+  ///
+  ///    class Test {};
+  /// \endcode
+  /// \version 1
----------------
HazardyKnusperkeks wrote:

```suggestion
  /// \version 18
```
You're a bit late for LLVM 1.0 ;)

https://github.com/llvm/llvm-project/pull/77918


More information about the cfe-commits mailing list