blob: 29e60cc88fa2f752a5f817c193e9ebe9a223b122 [file] [log] [blame]
.. title:: clang-tidy - cppcoreguidelines-macro-usage
Finds macro usage that is considered problematic because better language
constructs exist for the task.
The relevant sections in the C++ Core Guidelines are
`Enum.1 <>`_,
`ES.30 <>`_,
`ES.31 <>`_ and
`ES.33 <>`_.
.. option:: AllowedRegexp
A regular expression to filter allowed macros. For example
`DEBUG*|LIBTORRENT*|TORRENT*|UNI*` could be applied to filter `libtorrent`.
Default value is `^DEBUG_*`.
.. option:: CheckCapsOnly
Boolean flag to warn on all macros except those with CAPS_ONLY names.
This option is intended to ease introduction of this check into older
code bases. Default value is `false`.
.. option:: IgnoreCommandLineMacros
Boolean flag to toggle ignoring command-line-defined macros.
Default value is `true`.