Firstly: clang-format is not perfect. But manual formatting is worse. And perfect is the enemy of the good ;)
Secondly: that whole #if directive is horrible IMO and probably needs a simplification anyway. E.g. we could split out all tests where OpenMP5 or OpenACC do not work into a separate macro and then use this macro inside the #if.
I think clang-format may have uncovered a bug here. A && B || C is evaluated as (A && B) || C. In the example here:
(BOOST_COMP_GNUC < BOOST_VERSION_NUMBER(11, 0, 0)) && defined(TEST_UNIT_BLOCK_SHARED) || defined(TEST_UNIT_BLOCK_SYNC)
This will turn into (simplified the Boost stuff):
(BOOST_VERSION_CHECK && defined(TEST_UNIT_BLOCK_SHARED)) || defined(TEST_UNIT_BLOCK_SYNC)
Is this the actual intention of the macro?
There is indeed a pair of parens missing. Still, the clang format did also not propertly reflect the wrong logic.
Most helpful comment
I think clang-format may have uncovered a bug here.
A && B || Cis evaluated as(A && B) || C. In the example here:This will turn into (simplified the Boost stuff):
Is this the actual intention of the macro?