Issue 115278
Summary When using `Q_EMIT`, spaces are added around `->` operator
Labels new issue
Assignees
Reporter nbolton
    For example, when we format this line:
```
Q_EMIT model()->screensChanged();
```

Spaces are added around `->` operator:
```
Q_EMIT model() -> screensChanged();
```

When `Q_EMIT` is removed, the spaces are not added:
```
model()->screensChanged();
```

`.clang-format`
```
# Important: Use the same version of clang-format as our linter, which is:
#
# $ ./scripts/install_deps.py --only-python
# $ ./.venv/bin/clang-format --version
#
# Warning: If you use a different version, the formatting will be different.
#
# To install a specific version of clang-format, use pip:
# $ pip install clang-format==<version>

BasedOnStyle: LLVM

# Turn off LLVM default alignment of params with the opening bracket,
# which can be less readable in some cases in our code base.
#
# Using `BlockIndent` will result in:
#   void fooBarBazQuxHelloWorld(
#     int a,
#     int b
#   );
#
# Instead of:
#   void fooBarBazQuxHelloWorld(int a,
#                               int b);
AlignAfterOpenBracket: BlockIndent

# Turn off LLVM default packing of ctor initializers.
# This makes it easier to see which members were initialized and in what order.
PackConstructorInitializers: CurrentLine

# up our limit to 120
ColumnLimit: 120

# Custom Breaking rules
BreakBeforeBraces: Custom
BraceWrapping:
    AfterCaseLabel: false
    AfterClass: true
    AfterControlStatement: Never
    AfterEnum: true
 AfterFunction: true
    AfterNamespace: false
    AfterStruct: true
 AfterUnion: true
    AfterExternBlock: true
    BeforeCatch: false
    BeforeElse: false
    BeforeLambdaBody: false
 BeforeWhile: false

# no single line functions
AllowShortFunctionsOnASingleLine: None
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to