lattice / quda

QUDA is a library for performing calculations in lattice QCD on GPUs.
https://lattice.github.io/quda
Other
279 stars 94 forks source link

NULL and nullptr #987

Open cpviolator opened 4 years ago

cpviolator commented 4 years ago

Library wide, QUDA should use nullptr rather than NULL. A bash script that incrementally changes and commits should do the trick, specifically targeting NULL), ,NULL and NULL; to avoid messing with QUDA_NULL_FIELD_CREATE and comments.

mathiaswagner commented 4 years ago

what we want to use here is probably clang-tidy

cpviolator commented 4 years ago

@mathiaswagner https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html ?

mathiaswagner commented 4 years ago

Yes. Note that a ton of the modernize checks could probably be applied to QUDA and we should strive to modernize files that are touched anyway. Looking into this has been on my list for quite a while now.

cpviolator commented 4 years ago

Shall we make this a goal for 2.0?

mathiaswagner commented 4 years ago

Sure. We should work out a strategy. Some early thoughts

...

mathiaswagner commented 4 years ago

For reference as it seems useful: https://blog.kitware.com/static-checks-with-cmake-cdash-iwyu-clang-tidy-lwyu-cpplint-and-cppcheck/