<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/115278>115278</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
When using `Q_EMIT`, spaces are added around `->` operator
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
nbolton
</td>
</tr>
</table>
<pre>
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
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykVt9v2kgQ_muWlxHIrCmQBx6ABl0k2l6V9vJYjb1jvJf1rrW7htK__jS2CYQSKdVFKIjZmW---Wb2B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