[clang-tools-extra] [clang-tidy] new check readability-mark-static (PR #90830)
Danny Mösch via cfe-commits
cfe-commits at lists.llvm.org
Fri May 3 07:13:21 PDT 2024
================
@@ -0,0 +1,26 @@
+.. title:: clang-tidy - readability-unnecessary-external-linkage
+
+readability-unnecessary-external-linkage
+========================================
+
+Detects variable and function can be marked as static.
+
+Static functions and variables are scoped to a single file. Marking functions
+and variables as static helps to better remove dead code. In addition, it gives
+the compiler more information and can help compiler make more aggressive
+optimizations.
----------------
SimplyDanny wrote:
```suggestion
the compiler more information and allows for more aggressive optimizations.
```
https://github.com/llvm/llvm-project/pull/90830
More information about the cfe-commits
mailing list