[clang-tools-extra] [clang-tidy] Option to ignore anonymous namespaces in avoid-non-const-global-variables (PR #93827)
Piotr Zegar via cfe-commits
cfe-commits at lists.llvm.org
Thu May 30 07:28:26 PDT 2024
================
@@ -41,3 +41,25 @@ The variables ``a``, ``c``, ``c_ptr1``, ``c_const_ptr`` and ``c_reference``
will all generate warnings since they are either a non-const globally accessible
variable, a pointer or a reference providing global access to non-const data
or both.
+
+Options
+-------
+
+.. option:: AllowAnonymousNamespace
+
+ When set to `true` (default is `false`), non-const variables in anonymous namespaces will not generate a warning.
----------------
PiotrZSL wrote:
wrap on 80 column
https://github.com/llvm/llvm-project/pull/93827
More information about the cfe-commits
mailing list