diff --git a/doc/contributing/source/coding-style.rst b/doc/contributing/source/coding-style.rst index c530031a3..c7e6d07a1 100644 --- a/doc/contributing/source/coding-style.rst +++ b/doc/contributing/source/coding-style.rst @@ -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 ================