Issue 136597
Summary [clang-format] Pointer alignment option for function return types
Labels clang-format
Assignees
Reporter oajlouni
    This is a simple example to explain what I mean:

```
char* alloc_str(int size)
{
    char *str = malloc(size);

    return str;
}
```

I'd like to have my code formatted in a way that a pointer is right-aligned in a variable declaration and left-aligned if it is a return type.

Having read through **Clang-Format Style Options**, the only two options I've found were **DerivePointerAlignment** and **PointerAlignment** and they only seem to treat all pointers the same way.

Is there a way to achieve what I'm after? Or could this be worth considering as a new feature?

Thanks!
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to