[PATCH] D31635: [clang-format] Added ReferenceAlignmentStyle option

Duncan Ogilvie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 7 14:49:05 PDT 2019


mrexodia added a comment.

@MyDeveloperDay

I rebased and added unit tests + and ran clang-format.

@klimek

I just need this to be able to replace AStyle for my open source project (x64dbg). I just rebased because @STL_MSFT asked for it and I had some free time.

I don't think it is actually possible to be consistent with separate options for pointers and references. See for example https://docs.microsoft.com/en-us/cpp/cpp/references-to-pointers?view=vs-2019 which has:

`int Add2( BTree*& Root, char *szToAdd )`

Properly supporting this formatting likely isn't going to be pretty, but anyone is free to try with this rebased patch.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D31635/new/

https://reviews.llvm.org/D31635





More information about the llvm-commits mailing list