How can align if statement in cpp with clang?

65 Views Asked by At

I would like to align the following lines

if (_a) { return; }
if (__b) { return; }
if (____c) { return; }

with clang-format.

Desired Result:

if (_a)     { return; }
if (__b)    { return; }
if (____c)  { return; }

I'm using clang formatter with version 13.0. I've tried

AllowShortBlocksOnASingleLine: true
AllowShortIfStatementsOnASingleLine: WithoutElse

but i've obtained only aligned of conditions but not body statements.

0

There are 0 best solutions below