[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

Björn Svensson via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 22 06:42:54 PST 2023


================
@@ -0,0 +1,35 @@
+.. title:: clang-tidy - readability-redundant-inline-specifier
+
+readability-redundant-inline-specifier
+======================================
+
+Checks for instances of the `inline` keyword in code where it is redundant
+and recommends its removal.
+
+Examples:
+
+.. code-block:: c++
+
+   constexpr inline void f() {}
+
+In the example abvove the keyword `inline` is redundant since constexpr
+functions are implicitly inlined
----------------
bjosv wrote:

```suggestion
In the example above the keyword `inline` is redundant since constexpr
functions are implicitly inlined.
```

https://github.com/llvm/llvm-project/pull/73069


More information about the cfe-commits mailing list