1.. title:: clang-tidy - readability-static-accessed-through-instance
2
3readability-static-accessed-through-instance
4============================================
5
6Checks for member expressions that access static members through instances, and
7replaces them with uses of the appropriate qualified-id.
8
9Example:
10
11The following code:
12
13.. code-block:: c++
14
15  struct C {
16    static void foo();
17    static int x;
18  };
19
20  C *c1 = new C();
21  c1->foo();
22  c1->x;
23
24is changed to:
25
26.. code-block:: c++
27
28  C *c1 = new C();
29  C::foo();
30  C::x;
31
32