OpenCL-ICD-Loader icon indicating copy to clipboard operation
OpenCL-ICD-Loader copied to clipboard

Add .clang-tidy and enable higher warning level

Open mmha opened this issue 6 years ago • 0 comments

The number of checks that we can use is highly limited since this is a C project, not C++ and we have to do a few things that are UB strictly speaking (like void * <-> function pointer casts), but there are a few things we can enable that are still useful. Examples:


Note that this requires the generation of a compilation database which is most easily achieved by passing -DCMAKE_EXPORT_COMPILE_COMMANDS=ON to CMake >= 3.4. This shouldn't be much of a problem, as the way I set up the testing matrix in #65 makes it easy to switch out different build tools for different jobs in the matrix (just add another Conan profile). This way we can use this feature on our CI and still ensure that the project builds correctly with older CMake versions.

mmha avatar May 11 '19 07:05 mmha