[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() (PR #90043)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 25 10:18:17 PDT 2024


================
@@ -57,6 +58,8 @@ namespace cppcoreguidelines {
 class CppCoreGuidelinesModule : public ClangTidyModule {
 public:
   void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
+    CheckFactories.registerCheck<AvoidBoundsErrorsCheck>(
+        "cppcoreguidelines-avoid-bounds-errors");
----------------
PiotrZSL wrote:

check name cppcoreguidelines-avoid-bounds-errors is too generic for what check is doing, name it something like cppcoreguidelines-prefer-at-over-subscript-operator, or something simillar. Figure something out.

https://github.com/llvm/llvm-project/pull/90043


More information about the cfe-commits mailing list