[PATCH] D116314: [Clangfmt] Add style to separate definition blocks
    ksyx via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Mon Dec 27 11:29:02 PST 2021
    
    
  
ksyx added inline comments.
================
Comment at: clang/lib/Format/Format.cpp:1197
   LLVMStyle.ReferenceAlignment = FormatStyle::RAS_Pointer;
+  LLVMStyle.SeparateDefinitionBlocks = true;
   LLVMStyle.ShortNamespaceLines = 1;
----------------
ksyx wrote:
> Not so sure about this as it would break some tests.
As CI shows some original tests does not expect this empty line, but it looks like LLVM is generally adding empty lines between blocks.
```cpp
 template <typename T> class B;
+
 class A {
 public:
   int f();
-};
+};\n
```
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116314/new/
https://reviews.llvm.org/D116314
    
    
More information about the cfe-commits
mailing list