brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 3ca712b Raw
35 lines · plain
1.. title:: clang-tidy - bugprone-assert-side-effect2 3bugprone-assert-side-effect4===========================5 6Finds ``assert()`` with side effect.7 8The condition of ``assert()`` is evaluated only in debug builds so a9condition with side effect can cause different behavior in debug / release10builds.11 12Options13-------14 15.. option:: AssertMacros16 17   A comma-separated list of the names of assert macros to be checked.18   Default is `assert,NSAssert,NSCAssert`.19 20.. option:: CheckFunctionCalls21 22   Whether to treat non-const member and non-member functions as they produce23   side effects. Disabled by default because it can increase the number of false24   positive warnings.25 26.. option:: IgnoredFunctions27 28   A semicolon-separated list of the names of functions or methods to be29   considered as not having side-effects. Regular expressions are accepted,30   e.g. ``[Rr]ef(erence)?$`` matches every type with suffix ``Ref``, ``ref``,31   ``Reference`` and ``reference``. The default is empty. If a name in the list32   contains the sequence `::` it is matched against the qualified type name33   (i.e. ``namespace::Type``), otherwise it is matched against only34   the type name (i.e. ``Type``).35