llvm-project/clang-tools-extra/docs/clang-tidy/checks/misc/static-assert.rst
raw| 1 | .. title:: clang-tidy - misc-static-assert |
| 2 | |
| 3 | misc-static-assert |
| 4 | ================== |
| 5 | |
| 6 | `cert-dcl03-c` redirects here as an alias for this check. |
| 7 | |
| 8 | Replaces ``assert()`` with ``static_assert()`` if the condition is evaluable |
| 9 | at compile time. |
| 10 | |
| 11 | The condition of ``static_assert()`` is evaluated at compile time which is |
| 12 | safer and more efficient. |