blob: a4d84bbc51f4d1362e4b805e414f99e762f98ef1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
.. title:: clang-tidy - misc-assert-side-effect
misc-assert-side-effect
=======================
Finds ``assert()`` with side effect.
The condition of ``assert()`` is evaluated only in debug builds so a
condition with side effect can cause different behavior in debug / release
builds.
There are two options:
- :option:`AssertMacros`: A comma-separated list of the names of assert macros
to be checked.
- :option:`CheckFunctionCalls`: Whether to treat non-const member and
non-member functions as they produce side effects. Disabled by default
because it can increase the number of false positive warnings.
|