Issue |
142008
|
Summary |
[clang-format] EmptyLineAfterAccessModifier and EmptyLineBeforeAccessModifier for Qt-specific access modifiers
|
Labels |
clang-format
|
Assignees |
|
Reporter |
EugeneZelenko
|
Looks like `EmptyLineAfterAccessModifier` and `EmptyLineBeforeAccessModifier` are not applied to Qt-specific access modifiers: `signals`, `public slots`, `protected slots` and `private slots`.
Test file:
```
#include <string>
class Test
{
Q_OBJECT
public:
Test();
protected:
void protected_method();
private:
void private_method();
signals:
void signal();
public slots:
void public_slot();
protected slots:
void protected_slot();
private slots:
void private_slot();
};
```
I tried 19.1.1 and `main` (https://github.com/llvm/llvm-project/commit/49d48c32e04742ebd05cbbd7dd544b1217b6d9d0)
Configuration:
```
BasedOnStyle: LLVM
AlignConsecutiveDeclarations:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AllowShortFunctionsOnASingleLine: Inline
BreakBeforeBraces: Allman
ColumnLimit: 100
IndentPPDirectives: AfterHash
IndentWidth: 4
LineEnding: LF
UseTab: Never
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveMacros: AcrossEmptyLines
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
BinPackArguments: false
BinPackParameters: false
BreakConstructorInitializers: BeforeComma
BreakTemplateDeclarations: Yes
ConstructorInitializerIndentWidth: 0
ContinuationIndentWidth: 4
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: Always
FixNamespaceComments: true
MaxEmptyLinesToKeep: 1
PackConstructorInitializers: Never
PointerAlignment: Left
SortUsingDeclarations: true
StatementMacros:
- PyObject_HEAD
- Q_OBJECT
```
Abandoned patch on Phabricator: https://reviews.llvm.org/D129845
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs