clang-tidy - llvm-prefer-register-over-unsigned — Extra Clang Tools 10 documentation

# Extra Clang Tools 10 documentation

## clang-tidy - llvm-prefer-register-over-unsigned

# llvm-prefer-register-over-unsigned

Finds historical use of `unsigned` to hold vregs and physregs and rewrites them to use `Register`.

Currently this works by finding all variables of unsigned integer type whose initializer begins with an implicit cast from `Register` to `unsigned`.

    void example(MachineOperand &MO) {
      unsigned Reg = MO.getReg();
      ...
    }

becomes:

    void example(MachineOperand &MO) {
      Register Reg = MO.getReg();
      ...
    }