[clang] [clang-format] Allow custom pointer/ref alignment in return types (PR #169160)
Daan De Meyer via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 10 02:10:13 PST 2026
DaanDeMeyer wrote:
> I just think if we are introducing a struct mechanism for the option it should follow the previous struct pattern not make up a new one (Irrespective of if you feel its better, I think that subjective)... I'm still struggling with why we need this and not do it like we have with the BraceOption etc in the past. I'm a no to this design, but if @HazardyKnusperkeks and @owenca both agree its ok then I'll yield, but I'm not comfortable with it like this but I won't block them.
I am happy to rework it to the following:
```
PointerAlignment: Custom
CustomPointerAlignment:
Default: Right
CStyleCast: Left
ReturnType: Left
```
But we still need `Default` in that setup to specify the default alignment to use.
An alternative is
```
PointerAlignment: Right
PointerAlignmentOverride:
CStyleCast: Left
ReturnType: Left
```
Would that be acceptable?
https://github.com/llvm/llvm-project/pull/169160
More information about the cfe-commits
mailing list