quda
quda copied to clipboard
NULL and nullptr
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.
what we want to use here is probably clang-tidy
@mathiaswagner https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html ?
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.
Shall we make this a goal for 2.0?
Sure. We should work out a strategy. Some early thoughts
- which checks to use (might require a minimum version)
- when to apply them to which files (doing one mega pull for all of QUDA might only take us to merge hell)
...
For reference as it seems useful: https://blog.kitware.com/static-checks-with-cmake-cdash-iwyu-clang-tidy-lwyu-cpplint-and-cppcheck/