bolt/deps/llvm-18.1.8/clang-tools-extra/docs/clang-tidy/checks/readability/redundant-inline-specifier.rst

33 lines
802 B
ReStructuredText
Raw Normal View History

2025-02-14 19:21:04 +01:00
.. title:: clang-tidy - readability-redundant-inline-specifier
readability-redundant-inline-specifier
======================================
Detects redundant ``inline`` specifiers on function and variable declarations.
Examples:
.. code-block:: c++
constexpr inline void f() {}
In the example above the keyword ``inline`` is redundant since constexpr
functions are implicitly inlined
.. code-block:: c++
class MyClass {
inline void myMethod() {}
};
In the example above the keyword ``inline`` is redundant since member functions
defined entirely inside a class/struct/union definition are implicitly inlined.
Options
-------
.. option:: StrictMode
If set to `true`, the check will also flag functions and variables that
already have internal linkage as redundant.