17 lines · plain
1.. title:: clang-tidy - bugprone-multiple-statement-macro2 3bugprone-multiple-statement-macro4=================================5 6Detect multiple statement macros that are used in unbraced conditionals. Only7the first statement of the macro will be inside the conditional and the other8ones will be executed unconditionally.9 10Example:11 12.. code-block:: c++13 14 #define INCREMENT_TWO(x, y) (x)++; (y)++15 if (do_increment)16 INCREMENT_TWO(a, b); // (b)++ will be executed unconditionally.17