Regarding a clang-format option to separate the logical-not operator from its test

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Regarding a clang-format option to separate the logical-not operator from its test

Adam Cieszkiel via cfe-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hello all.

I have downloaded and installed the latest clang-format snapshot
(version 5, from apt.llvm.org) and have been playing around with
it a bit, and I like it. It has its quirks, but nothing that
would stop me using it for my project(s) ... except one thing.

I religiously insert a space between the "!" operator and its
test, like so:

    if (! foo)
        exit(EXIT_FAILURE);

    if (! bar())
        return false;

    if (! (foo = bar()))
        // etc ...

Were I to run clang-format on one of my larger projects at the
moment, it would generate a 2,332-line diff (1,158 insertions,
1,174 deletions) across all 47 source files. More than 92% of
the changes would be to remove that space, which I would rather
keep as it enhances readability.

Are there any plans to implement an option to insert a space
between the logical-not operator and its test? Has anyone else
asked this before? Is it even feasible?

Regards,
Aaron Jones

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJZXiBwAAoJEIrwc3SIqzASXBIQALoq/G7VXInPHK8/QVU4yf1U
eJUd5Qgkgu/yfrsPBFAxdz8wQEoOpKE+MGFRRgu0013LPrBfxGqppXpUEuiF8PSD
1WUzYOsLzPVlF8A+Y5BZCwtWLpbKnTg+x4RhA/s3DKXyfOM8OvnyBEvBVwYbMwj/
8Cu9W43Tjm2y6UKZ3AVtR+Rzi43khcqp2MLPj/0pJ3Uk/pvYKqlw7TkGbRoW4sbH
1UTNylQBCJcEGPACOiRd5ndE9WnMafNdErvrjt82jlo7G/OUnZsJ3R4J61XJ8YJ9
eJcnuxoZREBU6gLZmv5R8VGWzK0wisDejEFtEk3pVNMDB0ZoFWJe2b/bWGni7fKh
L6Qy4d/IcNlMeEP3e8gcOaPjmIpwnFtB9ZeuriBpeiGZUQT6jzctAvVxaWecQe8c
v/rWQuIoaRUfjAtTI7p0K/AeAh+gutL3kc3Z27r6WoWYFPR4HhChBBYP1/qOYCag
z+3xMBdM07R3NTOLdPH6F7GBVuIyL6wR6HzhSpeXhDzMUs+118nNzDFIA3oITzmz
ZmG0NSYasCnGGy+c49Fv9ZsNzRV4jighsUJIuExJcCN2lTR5XjwrlPG1fG8QZMxu
Ghjc117kORyK1fklZmubRbVqTQXfrpgmNUCw9Q6ec+GozY/PwWMLGoZa46EY29n5
yrUDM1ci78L+mFWeFp/X
=ueTp
-----END PGP SIGNATURE-----
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Loading...