1.. title:: clang-tidy - readability-static-definition-in-anonymous-namespace
2
3readability-static-definition-in-anonymous-namespace
4====================================================
5
6Finds static function and variable definitions in anonymous namespace.
7
8In this case, ``static`` is redundant, because anonymous namespace limits the
9visibility of definitions to a single translation unit.
10
11.. code-block:: c++
12
13  namespace {
14    static int a = 1; // Warning.
15    static const b = 1; // Warning.
16  }
17
18The check will apply a fix by removing the redundant ``static`` qualifier.
19