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

via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 25 07:14:47 PDT 2024


================
@@ -131,6 +131,11 @@ New checks
   to reading out-of-bounds data due to inadequate or incorrect string null
   termination.
 
+- New :doc:`cppcoreguidelines-avoid-bounds-errors
+  <clang-tidy/checks/cppcoreguidelines/avoid-bounds-errors>` check.
+
+  Flags the unsafe `operator[]` and replaces it with `at()`.
----------------
EugeneZelenko wrote:

Please use double back-ticks for language constructs. Same in documentation.

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


More information about the cfe-commits mailing list