================
@@ -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.
+
----------------
PiotrZSL wrote:

Any of the following names declared at namespace scope have internal linkage:
- variables, variable templates(since C++14), functions, or function templates 
declared static;

Looks fine... Still would be nice to allow user select static or anonymous 
namespace for "auto fix"

https://github.com/llvm/llvm-project/pull/90830
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to