Issue |
138720
|
Summary |
Misformatting around static_cast parentheses
|
Labels |
new issue
|
Assignees |
|
Reporter |
DarkTyger
|
A couple items of note.
First, with clang-format 20, using `SpacesInCStyleCastParentheses: true` produces:
``` c++
static_cast<type>( value );
( size_t )value;
```
Where `SpacesInCStyleCastParentheses: false` produces:
``` c++
static_cast<type>(value);
( size_t )value;
```
Is that backwards?
Second, would we be able to get an option to achieve the following:
``` c++
static_cast<type>( value );
(size_t)value;
```
Something like the following would make sense:
`SpacesInCStyleCastParentheses: false` and `SpacesInStaticCastParentheses: true`.
Here's the relevant config:
```
SpacesInCStyleCastParentheses: true
SpacesInConditionalStatement: true
SpacesInContainerLiterals: false
SpacesInParentheses: true
SpacesInParens: Custom
SpacesInParensOptions:
ExceptDoubleParentheses: false
InConditionalStatements: true
InCStyleCasts: true
InEmptyParentheses: false
Other: true
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs