[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)
via cfe-commits
cfe-commits at lists.llvm.org
Sat May 4 08:27:14 PDT 2024
================
@@ -0,0 +1,26 @@
+.. title:: clang-tidy - readability-mark-static
+
+readability-mark-static
+=======================
+
+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.
+
----------------
EugeneZelenko wrote:
I'm not sure about automatic fixes for anonymous namespaces. For example, in my work project we keep single monolithic anonymous namespace, so function body move would be required.
https://github.com/llvm/llvm-project/pull/90830
More information about the cfe-commits
mailing list