Xamarin Public Jenkins (auto-signing) 468663ddbb Imported Upstream version 6.10.0.49
Former-commit-id: 1d6753294b2993e1fbf92de9366bb9544db4189b
2020-01-16 16:38:04 +00:00

29 lines
548 B
ReStructuredText

.. title:: clang-tidy - modernize-use-bool-literals
modernize-use-bool-literals
===========================
Finds integer literals which are cast to ``bool``.
.. code-block:: c++
bool p = 1;
bool f = static_cast<bool>(1);
std::ios_base::sync_with_stdio(0);
bool x = p ? 1 : 0;
// transforms to
bool p = true;
bool f = true;
std::ios_base::sync_with_stdio(false);
bool x = p ? true : false;
Options
-------
.. option:: IgnoreMacros
If set to non-zero, the check will not give warnings inside macros. Default
is `1`.