This repo is just meant to be able to manage and plan who implements which part of the high integrity c++ - coding standard in clang-tidy. Would be nice to be able to reduce duplicate work :)
Just mention your name on the section you will take care of.
- compiler flags
- clang-static analyzer - dead-store
- i think there is no dead code check but i felt like there was one
- todo
- i dont think what how that could be done in one check, maybe this is something alot places will warn for?
- -Wdeprecated-increment-bool
- -Wdeprecated-register
- modernize-deprecated-header
- this would be done with many checkers that can transform as well?
- modernize-use-noexcept
- clang-format
- there is something?
- clang-format?!
- preprocessor could do that
- todo
- heuristic?
- todo, i thinnk cppcheck has something on it
- todo
- i saw a similar check once in codereview, but i might be wrong
- heuristic and maybe high false positive rate
- todo?
- should be ez, but unsure for that
- todo
- modernize-use-nullptr
- is there warning?
- todo
- -Wvexing-parse
- todo
- -Wreturn-stack-address
- lifetime analysis? this is CSA area i guess
- this is guideline, many cheks deal with it
- todo
- check for unions
- check for bad pointer arithmetic? -> pro-bounds in cppcoreguidelines
- cppcoreguidelines-pro-bounds-array-to-pointer-decay
4.2.1 Ensure that the U suffix is applied to a literal used in a context requiring an unsigned integral expression
- todo
- todo/impossible? static analyzer
- misc-misplaced-widening-cast?
4.4.1 Do not convert floating values to integral types except through use of standard library functions
- misc-misplaced-widening-cast?
- code review? is there a way to make some automation on that topic?
- order of evaluation, clang diagnostics? UBSan?
- todo
- todo
- todo - clang-format?
5.1.6 Do not code side effects into the right-hand operands of: &&, ||, sizeof, typeid or a function passed to condition_variable::wait
- start point could be misc-assert-side-effect
- cppcoreguidelines-pro-bounds-*
- i dont know, is there a callgraph analysis method?
- i think this should be ez
- cppcoreguidelines-no-malloc
- static analysis does it already AFAIK
- cppcoreguidelines-pro-type-const-cast
- cppcoreguidelines-pro-type-cstyle-cast
- google-explicit-constructor
- google-readability-casting
- todo but is it necessary? casting is bad anyway and enforced already
- todo but maybe already covered by cast checker
5.5.1 Ensure that the right hand operand of the division or remainder operators is demonstrably non-zero
- clang-static-analyzer core.DivideZero
- todo
- todo
- check for equality comparison with floating point values
- todo
- todo
- readability-braces-around-statements
- -Wswitch
- hicpp-multiway-paths-covered
- -Wimplicit-fallthrough
- hicpp-multiway-paths-covered
- modernize-loop-convert
6.2.2 Ensure that a loop has a single loop counter, an optional control variable, and is not degenerate
- hmmm, complicated?
- todo
- not ez, but visiting the compound stmt could be done, see readability-function-size
- todo
- should be done ez as well
- todo
6.3.1 Ensure that the label(s) for a jump statement or a switch condition appear later, in the same or an enclosing block
- idk, but but that feels like static analysis?
- todo
6.3.2 Ensure that execution of a function with a non-void return type ends in a return statement with a value
- compiler diagnostics has that already!
- todo
- there is one already, i did not find it atm
- todo
- very valuable to have a checker that will do const correctness with automatic fixing
- todo
- todo
- clang-format area i think
- todo
- hm, is this something for readability-function-size?
- todo
- use of uint8 and so on
- todo
- minor check,not so relevant
- todo
7.1.8 Use auto id = expr when declaring a variable to have the same type as its initializer function call
- modernize-use-auto
- todo
- misc-static-assert
- does the compiler already warn for this?
- todo
- minor check?
- todo
- todo, ez
- maybe clang-modularize deals with it?
7.4.1 Ensure that any objects, functions or types to be used from a single translation unit are defined in an unnamed namespace in the main source file
- todo?
7.4.2 Ensure that an inline function, a function template, or a type used from multiple translation units is defined in a single header file
- todo?
7.4.3 Ensure that an object or a function used from multiple translation units is declared in a single header file
- todo?
- hicpp-no-assembler
- todo, type checking on declarations
- readability-identifier-naming
- readability-function-size
- todo
- todo, type checking in functionDecl arguments
- readability-function-size
- readability-function-size
- todo
- google-default-arguments as a starting point
- todo
- todo?
- warning for uninitialized variables should the compiler do
- access freed memory is CSA, and maybe impossible to determine statically?
- misc-use-after-move
- todo
9.1.1 Declare static any member function that does not require this. Alternatively, declare const any member function that does not modify the externally visible state of the object
- todo
- especially the const part is a general issue (automatically mark methods const if possible), i think this check is especially valuable
- todo
- todo, EZ? and very valuable belonging safety
9.1.4 Do not write member functions which return non-const handles to data less accessible than the member function
- feels like general version of 9.1.3, should be implemented in the same check
- todo
- todo
- todo
- todo
- check for necessaity of a virtual base class
- modernize-use-override
- todo
- check inheritence properties
- todo
- EZ, just check for class, and warn for all data public data members
- execption are extern "C" { struct }
- todo
- EZ warn for friends
- google-explicit-constructor
- maybe modification, but doesnt seem like it
- todo
- misc-new-delete-overloads
- todo
- maybe something for undefinedbehavioursanitizer?
12.4.2 Ensure that a constructor initializes explicitly all base classes and non-static data members
- todo for the baseclasses?
- cppcoreguidelines-pro-type-member-init
12.4.3 Do not specify both an NSDMI and a member initializer in a constructor for the same non static member
- todo
- i though there is an check for that, cannot find it!
- maybe todo
- misc-undelegated-constructor
- modernize-use-equals-default
- modernize-use-equals-delete
- handled by the check for 12.5.1
- todo
- misc-noexcept-move-constructor
- todo?
12.5.6 Use an atomic, non-throwing swap operation to implement the copy and move assignment operators
- todo
- cppcoreguidelines-special-member-functions
- todo
- todo
13.1.2 If a member of a set of callable functions includes a universal reference parameter, ensure that one appears in the same position for all other members
- todo
- todo
13.2.2 Ensure that the return type of an overloaded binary operator matches the built-in counterparts
- todo
- that should be a lot to do, but rather mechanical
- todo
- operator overload knows if its in a class or nonmember in clang?
13.2.4 When overloading the subscript operator (operator[]) implement both const and non-const versions
- todo
- i think its ez
- todo
- heuristic, but i think codereview is necessary
template stuff scares me :)
- todo
- cppcoreguidelines-pro-type-vararg
- todo
- todo
- todo
- hicpp-exception-baseclass
- front end will implement/has implemented
15.3.1 Do not access non-static members from a catch handler of constructor/destructor function try block
- todo
- GSoC has something on this for the CSA i believe
- traversing all statements and find out all member acesses
- todo
- static analysis?
16.1.1 Use the preprocessor only for implementing include guards, and including header files with include guards
- todo
- there is something in review or commited already
- refactoring needs that as well, replace MACRO with inline function for example
- todo
- todo
- could be done?
- todo
- easy or not? system will contain windows headers as well?
- todo
- modularize?
- in code review, by jonathan
- todo
- misc-move-const-arg
- todo
- can be done?
- use after move is almost the same
- todo
- todo
- should be done?
- interesting
- modernize-use-emplace
- todo
- todo
- modernize old thread stuff?
- todo
- check all decl if its a std::thread?
- todo
- static analysis
- todo
- forbid volatile in general? :D
- todo
- todo
- static analysis
- todo
- static analysis possible?
- todo
- ez
- todo
- maybe one step can be std::lock_guard could be warned always
- todo
- ez?
- todo
- todo