28 lines · plain
1.. title:: clang-tidy - llvm-prefer-register-over-unsigned2 3llvm-prefer-register-over-unsigned4==================================5 6Finds historical use of ``unsigned`` to hold vregs and physregs and rewrites7them to use ``Register``.8 9Currently this works by finding all variables of unsigned integer type whose10initializer begins with an implicit cast from ``Register`` to ``unsigned``.11 12.. code-block:: c++13 14 void example(MachineOperand &MO) {15 unsigned Reg = MO.getReg();16 ...17 }18 19becomes:20 21.. code-block:: c++22 23 void example(MachineOperand &MO) {24 Register Reg = MO.getReg();25 ...26 }27 28