clang-tidy: more misc+readability
authorRoland Schulz <roland.schulz@intel.com>
Sat, 30 Jun 2018 20:01:04 +0000 (13:01 -0700)
committerRoland Schulz <roland.schulz@intel.com>
Tue, 3 Jul 2018 07:55:21 +0000 (00:55 -0700)
commite121674e25cc95f06ffc7e3d7621841a8641c5b8
treeb3f127ef3e22543dc42d502426b6c225d20a3298
parent2217712bd38966df5b962902cbe1fe7f57a8cbfc
clang-tidy: more misc+readability

Auto fixes:
misc-macro-parentheses
readability-named-parameter

Enabled with few violations disabled by configuration:
misc-throw-by-value-catch-by-reference
readability-function-size

Set clang-tidy checks as list to allow comments.

Refactored the operator <<< used by GMX_THROW to take the exception by
value and return a copy, which is easier for tools to see is a proper
throw-by-value (of a temporary).  Performance on the throwing path is
not important, but is anyway not affected because the inlining of the
operator allows the compiler to elide multiple copies. This also
avoids casting away the constness.

Change-Id: I85c3e3c8a494119ef906c0492680c0d0b177a38d
28 files changed:
src/gromacs/CMakeLists.txt
src/gromacs/domdec/domdec_network.cpp
src/gromacs/ewald/pme-gather.cpp
src/gromacs/ewald/pme-gpu-program-impl.cpp
src/gromacs/ewald/pme-solve.cpp
src/gromacs/ewald/pme-spread.cpp
src/gromacs/fileio/libxdrf.cpp
src/gromacs/fileio/md5.cpp
src/gromacs/fileio/tpxio.cpp
src/gromacs/gmxana/gmx_chi.cpp
src/gromacs/gmxana/gmx_dipoles.cpp
src/gromacs/gmxana/gmx_enemat.cpp
src/gromacs/gmxana/gmx_hbond.cpp
src/gromacs/gmxana/princ.cpp
src/gromacs/gmxpreprocess/gen_maxwell_velocities.cpp
src/gromacs/gmxpreprocess/gen_vsite.cpp
src/gromacs/gmxpreprocess/hackblock.cpp
src/gromacs/gmxpreprocess/ter_db.cpp
src/gromacs/gpu_utils/gpu_utils.cpp
src/gromacs/mdlib/nbnxn_kernels/.clang-tidy [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_search.cpp
src/gromacs/mdlib/nbnxn_tuning.cpp
src/gromacs/mdlib/ns.cpp
src/gromacs/pbcutil/mshift.cpp
src/gromacs/pulling/pull_rotation.cpp
src/gromacs/tools/check.cpp
src/gromacs/utility/exceptions.h
src/gromacs/utility/qsort_threadsafe.cpp