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

26 lines
578 B
ReStructuredText

.. title:: clang-tidy - modernize-unary-static-assert
modernize-unary-static-assert
=============================
The check diagnoses any ``static_assert`` declaration with an empty string literal
and provides a fix-it to replace the declaration with a single-argument ``static_assert`` declaration.
The check is only applicable for C++17 and later code.
The following code:
.. code-block:: c++
void f_textless(int a) {
static_assert(sizeof(a) <= 10, "");
}
is replaced by:
.. code-block:: c++
void f_textless(int a) {
static_assert(sizeof(a) <= 10);
}