[PATCH] D65919: [clang-tidy] Add llvm-prefer-register-over-unsigned check and apply it to LLVM

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 30 04:56:59 PDT 2019


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM aside from a nit with `auto`.



================
Comment at: clang-tools-extra/clang-tidy/llvm/PreferRegisterOverUnsignedCheck.cpp:47
+    for (const auto *UsingDirective : Context->using_directives()) {
+      const auto *Namespace = UsingDirective->getNominatedNamespace();
+      if (isa<TranslationUnitDecl>(Namespace->getDeclContext()) &&
----------------
Don't use `const auto *` here as the type is not spelled out in the initializer.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65919/new/

https://reviews.llvm.org/D65919





More information about the cfe-commits mailing list