[clang-tools-extra] [clang-tidy] Option to ignore anonymous namespaces in avoid-non-const-global-variables (PR #93827)
via cfe-commits
cfe-commits at lists.llvm.org
Thu May 30 07:14:01 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.
----------------
EugeneZelenko wrote:
Default value is usually stated in dedicated sentence at the end of paragraph.
https://github.com/llvm/llvm-project/pull/93827
More information about the cfe-commits
mailing list