Closed llvmbot closed 1 year ago
Thanks for the comments Eugene,
right. I guess may of the validation are already implemented in clang-tidy. I think it's also possible to perform an analysis of the rules based on the existing presets for hicpp and cppcoreguidelines.
In an appendix in the AUTOSAR C++ 14 standard, there is a comparison between AUTOSAR C++14 and both HICPP and C++ core guidelines.
I guess that the request could be as simple as just define a preset (e.g. autosarcpp14) like hicpp and cppcoreguidelines but for AUTOSAR C++14 standard.
A4-10-1 and M4-10-2 are modernize-use-nullptr.
I glanced https://www.autosar.org/fileadmin/user_upload/standards/adaptive/17-03/AUTOSAR_RS_CPP14Guidelines.pdf and look like many checks are implemented as Clang warnings. Probably some checks are implemented in Clang-tidy (for example, M2-13-4 is readability-uppercase-literal-suffix). In such cases it's necessary just add aliases.
AUTOSAR module won't be added for the time being due to legal issues. See discussion: https://reviews.llvm.org/D112730
Extended Description
clang-tidy provide many sets of checks for some coding standards like SEI CERT, and High Integrity C++; but it does not have a set and probably not all the automatable checks for AUTOSAR C++14.
It would be nice if the verification set for AUTOSAR C ++ 14 is included. This is becoming an important standard in security related systems.
There are some static analysis tools that already support it, but all of them are proprietary.
There is nothing in the conditions of the standard that forbid any tool to include the set of check or make a reference to the standard.