doc: Update coding-style.rst with unneeded typedef in struct and enum

This commit is contained in:
Eduardo Almeida
2022-12-07 19:29:44 +00:00
parent b0e8347193
commit 5bc9f60f7f

View File

@@ -1151,6 +1151,22 @@ Miscellaneous items
- Do not add the ``enum`` or ``struct`` specifiers when declaring the variable's type.
- Do not unnecessarily add ``typedef`` to ``struct`` or ``enum``.
.. sourcecode:: cpp
// Avoid
typedef struct
{
...
} MyStruct;
// Prefer
struct MyStruct
{
...
};
Clang-tidy rules
================