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

Manuel Pietsch via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 12 04:48:29 PDT 2024


Paul =?utf-8?q?Heidekrüger?= <paul.heidekrueger at tum.de>,
Paul =?utf-8?q?Heidekrüger?= <paul.heidekrueger at tum.de>,
Paul =?utf-8?q?Heidekrüger?= <paul.heidekrueger at tum.de>,
Paul =?utf-8?q?Heidekrüger?= <paul.heidekrueger at tum.de>,
Paul =?utf-8?q?Heidekrüger?= <paul.heidekrueger at tum.de>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/95220 at github.com>


leunam99 wrote:

> I still think "AvoidBoundErrors" is the best name since it maps exactly to what the guidelines call it.

For me, this sounds to general for what the check currently does. The Enforcement section at the end of the rule SL.con.3 states:
> Issue a diagnostic for any call to a standard-library function that is not bounds-checked.

The guidelines do not provide a list of such functions and we are not familliar enough with the standard library to create a comprehensive list ourself, so at this time, we are unable to implement the full rule.


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


More information about the cfe-commits mailing list