[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang-tools-extra / docs / clang-tidy / checks / readability / static-accessed-through-instance.rst
blob23d12f418366402bb1d97517e19a8c04cbd354fb
1 .. title:: clang-tidy - readability-static-accessed-through-instance
3 readability-static-accessed-through-instance
4 ============================================
6 Checks for member expressions that access static members through instances, and
7 replaces them with uses of the appropriate qualified-id.
9 Example:
11 The following code:
13 .. code-block:: c++
15   struct C {
16     static void foo();
17     static int x;
18     enum { E1 };
19     enum E { E2 };
20   };
22   C *c1 = new C();
23   c1->foo();
24   c1->x;
25   c1->E1;
26   c1->E2;
28 is changed to:
30 .. code-block:: c++
32   C *c1 = new C();
33   C::foo();
34   C::x;
35   C::E1;
36   C::E2;