owenca wrote:

> This allows disabling variable alignment declarations while still having 
> function alignment. It also distinguishes between class member variables and 
> other variables (e.g. function local variables).

See 
https://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options.
 I'm more interested in the first two bullets there. If we decide to go forward 
with enabling finer controls of aligning consecutive declarations of variables, 
we probably want to add an enum/struct option to `AlignConsecutiveDeclarations`.

An enum example:
```
AlignConsecutiveDeclarations:
  # excluding function pointers?
  AlignVariableDeclarations: Always # or DataMembers or Never
```

A struct example:
```
AlignConsecutiveDeclarations:
  AlignVariableDeclarations: # including function pointers?
    GlobalVariables: true
    LocalVariables: true
    DataMembers: true
```

https://github.com/llvm/llvm-project/pull/160270
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to