Open N-Dekker opened 1 year ago
@llvm/issue-subscribers-clang-tidy
Are C++ core guidelines fully supported in all of clang tools? I see it is with clang-tidy and clang-format. Any other reference would help.
Are C++ core guidelines fully supported in all of clang tools? I see it is with clang-tidy and clang-format. Any other reference would help.
No. The cppcoreguidelines are not fully supported. There is no "global preset" or anything as an best-effort available either.
clang-tidy
has its module and probably a few checks of other modules address issues of the coreguidelines as well (they are often aliased into the cppcoreguidelines
module too).
C++ Core Guidelines, September 23, 2022, item ES.23: Prefer the
{}
-initializer syntax says:So for example, when declaring an
m
xn
matrix object (assuming aMatrix::Matrix(int m, int n)
constructor):The new style (using curly braces) appears preferable, according to this guideline. Would it be possible to add a clang-tidy check, to warn against using the old style, as well as the ability to convert code to the new style (using the option
-fix
)?