[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang-tools-extra / docs / clang-tidy / checks / llvm / prefer-register-over-unsigned.rst
blob5d78a188ebc932a5395eb4926ead37919552c9f8
1 .. title:: clang-tidy - llvm-prefer-register-over-unsigned
3 llvm-prefer-register-over-unsigned
4 ==================================
6 Finds historical use of ``unsigned`` to hold vregs and physregs and rewrites
7 them to use ``Register``.
9 Currently this works by finding all variables of unsigned integer type whose
10 initializer begins with an implicit cast from ``Register`` to ``unsigned``.
12 .. code-block:: c++
14   void example(MachineOperand &MO) {
15     unsigned Reg = MO.getReg();
16     ...
17   }
19 becomes:
21 .. code-block:: c++
23   void example(MachineOperand &MO) {
24     Register Reg = MO.getReg();
25     ...
26   }