1 .. title:: clang-tidy - bugprone-assert-side-effect
3 bugprone-assert-side-effect
4 ===========================
6 Finds ``assert()`` with side effect.
8 The condition of ``assert()`` is evaluated only in debug builds so a
9 condition with side effect can cause different behavior in debug / release
15 .. option:: AssertMacros
17 A comma-separated list of the names of assert macros to be checked.
19 .. option:: CheckFunctionCalls
21 Whether to treat non-const member and non-member functions as they produce
22 side effects. Disabled by default because it can increase the number of false
25 .. option:: IgnoredFunctions
27 A semicolon-separated list of the names of functions or methods to be
28 considered as not having side-effects. Regular expressions are accepted,
29 e.g. `[Rr]ef(erence)?$` matches every type with suffix `Ref`, `ref`,
30 `Reference` and `reference`. The default is empty. If a name in the list
31 contains the sequence `::` it is matched against the qualified typename
32 (i.e. `namespace::Type`, otherwise it is matched against only
33 the type name (i.e. `Type`).