aaron.ballman added inline comments.
================ Comment at: clang-tools-extra/clang-tidy/llvm/PreferRegisterOverUnsignedCheck.cpp:40 + + diag(UserVarDecl->getLocation(), "var %0 is %1 but holds a register") + << UserVarDecl << *VarType; ---------------- How about `variable %0 declared as %1; use '%2' instead` and move it below to where the fix-it is issued? ================ Comment at: clang-tools-extra/clang-tidy/llvm/PreferRegisterOverUnsignedCheck.cpp:44 + const DeclContext *Context = UserVarDecl->getDeclContext(); + while((Context = Context->getParent()) != nullptr) { + if (const auto *Namespace = dyn_cast<NamespaceDecl>(Context)) ---------------- Formatting looks off here, you should run the patch through clang-format. ================ Comment at: clang-tools-extra/clang-tidy/llvm/PreferRegisterOverUnsignedCheck.cpp:53 + } + diag(UserVarDecl->getLocation(), "use '%0'", DiagnosticIDs::Note) + << Replacement ---------------- I don't think you should issue a second diagnostic on the same line. Instead, only issue the previous diagnostic with the fixit attached to it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65919/new/ https://reviews.llvm.org/D65919 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits