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

2024-06-30 Thread Paul Heidekrüger via cfe-commits
https://github.com/PBHDK updated https://github.com/llvm/llvm-project/pull/95220 From 37292995de0c5aa87408586749795a97468d4725 Mon Sep 17 00:00:00 2001 From: Sebastian Wolf Date: Wed, 17 Apr 2024 16:16:35 +0200 Subject: [PATCH 01/23] Enforce SL.con.3: Add check to replace operator[] with at() o

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

2024-06-30 Thread Paul Heidekrüger via cfe-commits
https://github.com/PBHDK updated https://github.com/llvm/llvm-project/pull/95220 From 37292995de0c5aa87408586749795a97468d4725 Mon Sep 17 00:00:00 2001 From: Sebastian Wolf Date: Wed, 17 Apr 2024 16:16:35 +0200 Subject: [PATCH 01/24] Enforce SL.con.3: Add check to replace operator[] with at() o

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

2024-06-30 Thread Paul Heidekrüger via cfe-commits
https://github.com/PBHDK updated https://github.com/llvm/llvm-project/pull/95220 From 37292995de0c5aa87408586749795a97468d4725 Mon Sep 17 00:00:00 2001 From: Sebastian Wolf Date: Wed, 17 Apr 2024 16:16:35 +0200 Subject: [PATCH 01/25] Enforce SL.con.3: Add check to replace operator[] with at() o

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

2024-07-08 Thread Paul Heidekrüger via cfe-commits
@@ -0,0 +1,124 @@ +//===--- ProBoundsAvoidUncheckedContainerAccesses.cpp - clang-tidy ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2024-07-08 Thread Paul Heidekrüger via cfe-commits
@@ -0,0 +1,124 @@ +//===--- ProBoundsAvoidUncheckedContainerAccesses.cpp - clang-tidy ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2024-06-07 Thread Paul Heidekrüger via cfe-commits
PBHDK wrote: > > > I am adding @leunam99 and @PBHDK to the PR, who will contribute in the > > > next few weeks. > > > > > > Since we cannot push to this PR, we will be submitting a new PR with > > @sebwolf-de's + our work, correct, @EugeneZelenko, @PiotrZSL, @HerrCai0907? > > Could you pleas

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

2024-06-10 Thread Paul Heidekrüger via cfe-commits
PBHDK wrote: > Check if you can commit to sebwolf-de:avoid-bounds-error-check Unfortunately, we can't. We do not have access to Sebastian's LLVM fork. Since Sebastian is out of office right now - this is one of the reasons we're involved - would you be ok with us submitting a new PR with our ch

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

2024-06-12 Thread Paul Heidekrüger via cfe-commits
https://github.com/PBHDK created https://github.com/llvm/llvm-project/pull/95220 This PR is based on the PR #90043 by @sebwolf-de, who has given us (@leunam99 and myself) [permission to continue his work](https://github.com/llvm/llvm-project/pull/90043#issuecomment-2137455627). The original PR

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

2024-06-12 Thread Paul Heidekrüger via cfe-commits
PBHDK wrote: > Yes, you can just submit new PR, reference this one. Done! Here it is: https://github.com/llvm/llvm-project/pull/95220 https://github.com/llvm/llvm-project/pull/90043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

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

2024-06-12 Thread Paul Heidekrüger via cfe-commits
@@ -0,0 +1,31 @@ +.. title:: clang-tidy - cppcoreguidelines-prefer-at-over-subscript-operator + +cppcoreguidelines-prefer-at-over-subscript-operator += + +This check flags all uses of ``operator[]`` where an equivalent (same parameter and retur

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

2024-06-12 Thread Paul Heidekrüger via cfe-commits
https://github.com/PBHDK edited https://github.com/llvm/llvm-project/pull/95220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-06-12 Thread Paul Heidekrüger via cfe-commits
https://github.com/PBHDK edited https://github.com/llvm/llvm-project/pull/95220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-06-12 Thread Paul Heidekrüger via cfe-commits
https://github.com/PBHDK updated https://github.com/llvm/llvm-project/pull/95220 From 37292995de0c5aa87408586749795a97468d4725 Mon Sep 17 00:00:00 2001 From: Sebastian Wolf Date: Wed, 17 Apr 2024 16:16:35 +0200 Subject: [PATCH 01/11] Enforce SL.con.3: Add check to replace operator[] with at() o

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

2024-06-13 Thread Paul Heidekrüger via cfe-commits
https://github.com/PBHDK updated https://github.com/llvm/llvm-project/pull/95220 From 37292995de0c5aa87408586749795a97468d4725 Mon Sep 17 00:00:00 2001 From: Sebastian Wolf Date: Wed, 17 Apr 2024 16:16:35 +0200 Subject: [PATCH 01/12] Enforce SL.con.3: Add check to replace operator[] with at() o

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

2024-06-13 Thread Paul Heidekrüger via cfe-commits
https://github.com/PBHDK edited https://github.com/llvm/llvm-project/pull/95220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-06-17 Thread Paul Heidekrüger via cfe-commits
https://github.com/PBHDK updated https://github.com/llvm/llvm-project/pull/95220 From 37292995de0c5aa87408586749795a97468d4725 Mon Sep 17 00:00:00 2001 From: Sebastian Wolf Date: Wed, 17 Apr 2024 16:16:35 +0200 Subject: [PATCH 01/15] Enforce SL.con.3: Add check to replace operator[] with at() o

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

2024-06-17 Thread Paul Heidekrüger via cfe-commits
https://github.com/PBHDK updated https://github.com/llvm/llvm-project/pull/95220 From 37292995de0c5aa87408586749795a97468d4725 Mon Sep 17 00:00:00 2001 From: Sebastian Wolf Date: Wed, 17 Apr 2024 16:16:35 +0200 Subject: [PATCH 01/16] Enforce SL.con.3: Add check to replace operator[] with at() o

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

2024-06-17 Thread Paul Heidekrüger via cfe-commits
@@ -0,0 +1,123 @@ +//===--- PreferAtOverSubscriptOperatorCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2024-06-17 Thread Paul Heidekrüger via cfe-commits
https://github.com/PBHDK updated https://github.com/llvm/llvm-project/pull/95220 From 37292995de0c5aa87408586749795a97468d4725 Mon Sep 17 00:00:00 2001 From: Sebastian Wolf Date: Wed, 17 Apr 2024 16:16:35 +0200 Subject: [PATCH 01/17] Enforce SL.con.3: Add check to replace operator[] with at() o

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

2024-06-17 Thread Paul Heidekrüger via cfe-commits
@@ -0,0 +1,40 @@ +//===--- PreferAtOverSubscriptOperatorCheck.h - clang-tidy --*- C++ -*-===// +//===--- PreferMemberInitializerCheck.h - clang-tidy *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See htt

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

2024-06-17 Thread Paul Heidekrüger via cfe-commits
PBHDK wrote: > Btw, I realize that this check is part of the [bounds > profile](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#SS-bounds) > (Bounds.4), so for consistency it should probably be named > `cppcoreguidelines-pro-bounds-...`. What do you think of: `cppcoreguidelines-

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

2024-06-18 Thread Paul Heidekrüger via cfe-commits
PBHDK wrote: > Btw, I realize that this check is part of the [bounds > profile](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#SS-bounds) > (Bounds.4), so for consistency it should probably be named > `cppcoreguidelines-pro-bounds-...`. This becomes then the last remaining > che

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

2024-06-21 Thread Paul Heidekrüger via cfe-commits
https://github.com/PBHDK updated https://github.com/llvm/llvm-project/pull/95220 From 37292995de0c5aa87408586749795a97468d4725 Mon Sep 17 00:00:00 2001 From: Sebastian Wolf Date: Wed, 17 Apr 2024 16:16:35 +0200 Subject: [PATCH 01/18] Enforce SL.con.3: Add check to replace operator[] with at() o

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

2024-06-21 Thread Paul Heidekrüger via cfe-commits
https://github.com/PBHDK updated https://github.com/llvm/llvm-project/pull/95220 From 37292995de0c5aa87408586749795a97468d4725 Mon Sep 17 00:00:00 2001 From: Sebastian Wolf Date: Wed, 17 Apr 2024 16:16:35 +0200 Subject: [PATCH 01/19] Enforce SL.con.3: Add check to replace operator[] with at() o

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

2024-06-21 Thread Paul Heidekrüger via cfe-commits
https://github.com/PBHDK updated https://github.com/llvm/llvm-project/pull/95220 From 37292995de0c5aa87408586749795a97468d4725 Mon Sep 17 00:00:00 2001 From: Sebastian Wolf Date: Wed, 17 Apr 2024 16:16:35 +0200 Subject: [PATCH 01/21] Enforce SL.con.3: Add check to replace operator[] with at() o

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

2024-06-21 Thread Paul Heidekrüger via cfe-commits
@@ -0,0 +1,40 @@ +//===--- PreferAtOverSubscriptOperatorCheck.h - clang-tidy --*- C++ -*-===// +//===--- PreferMemberInitializerCheck.h - clang-tidy *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See htt

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

2024-06-03 Thread Paul Heidekrüger via cfe-commits
PBHDK wrote: > I am adding @leunam99 and @PBHDK to the PR, who will contribute in the next > few weeks. Since we cannot push to this PR, we will be submitting a new PR with @sebwolf-de's + our work, correct, @EugeneZelenko, @PiotrZSL, @HerrCai0907? https://github.com/llvm/llvm-project/pull/90

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

2024-08-02 Thread Paul Heidekrüger via cfe-commits
@@ -0,0 +1,137 @@ +//===--- ProBoundsAvoidUncheckedContainerAccesses.cpp - clang-tidy ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2024-08-02 Thread Paul Heidekrüger via cfe-commits
@@ -0,0 +1,137 @@ +//===--- ProBoundsAvoidUncheckedContainerAccesses.cpp - clang-tidy ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2024-08-08 Thread Paul Heidekrüger via cfe-commits
@@ -0,0 +1,124 @@ +//===--- ProBoundsAvoidUncheckedContainerAccesses.cpp - clang-tidy ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2024-08-08 Thread Paul Heidekrüger via cfe-commits
@@ -0,0 +1,124 @@ +//===--- ProBoundsAvoidUncheckedContainerAccesses.cpp - clang-tidy ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2024-08-08 Thread Paul Heidekrüger via cfe-commits
https://github.com/PBHDK edited https://github.com/llvm/llvm-project/pull/95220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-08-08 Thread Paul Heidekrüger via cfe-commits
@@ -0,0 +1,40 @@ +//===--- ProBoundsAvoidUncheckedContainerAccesses.h - clang-tidy *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

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

2024-08-08 Thread Paul Heidekrüger via cfe-commits
@@ -0,0 +1,137 @@ +//===--- ProBoundsAvoidUncheckedContainerAccesses.cpp - clang-tidy ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2024-08-08 Thread Paul Heidekrüger via cfe-commits
@@ -160,6 +160,11 @@ New checks Replaces nested ``std::min`` and ``std::max`` calls with an initializer list where applicable. +- New :doc:`cppcoreguidelines-pro-bounds-avoid-unchecked-container-accesses PBHDK wrote: Are you referring to a double "it" som

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

2024-06-22 Thread Paul Heidekrüger via cfe-commits
https://github.com/PBHDK updated https://github.com/llvm/llvm-project/pull/95220 From 37292995de0c5aa87408586749795a97468d4725 Mon Sep 17 00:00:00 2001 From: Sebastian Wolf Date: Wed, 17 Apr 2024 16:16:35 +0200 Subject: [PATCH 01/22] Enforce SL.con.3: Add check to replace operator[] with at() o

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

2024-06-26 Thread Paul Heidekrüger via cfe-commits
PBHDK wrote: > The name sounds nice. Thanks. > Please address the concerns here and in #90043 to always suggest `at` as > well. An option to enable suggesting and providing a fix to use `at` (or > `gsl::at`), like others have suggested, sounds like the best option. Thank you for taking another

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

2024-09-12 Thread Paul Heidekrüger via cfe-commits
paulhdk wrote: Hi all, just giving this a polite bump. Please do let us know if you have any questions or if there's anything we can do to make reviewing easier. https://github.com/llvm/llvm-project/pull/95220 ___ cfe-commits mailing list cfe-commits

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

2025-02-14 Thread Paul Heidekrüger via cfe-commits
@@ -0,0 +1,227 @@ +// RUN: %check_clang_tidy -std=c++2b -check-suffix=DEFAULT %s \ +// RUN: cppcoreguidelines-pro-bounds-avoid-unchecked-container-accesses %t -- \ +// RUN: -config='{CheckOptions: {cppcoreguidelines-pro-bounds-avoid-unchecked-container-accesses.ExcludeClasses: "

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

2025-02-17 Thread Paul Heidekrüger via cfe-commits
@@ -0,0 +1,124 @@ +//===--- ProBoundsAvoidUncheckedContainerAccesses.cpp - clang-tidy ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2025-02-17 Thread Paul Heidekrüger via cfe-commits
paulhdk wrote: Sorry for letting this sit for long! I've addressed the most recent comments. Based on what @leunam99 wrote above, the following questions are still unresolved: * It is still unclear to us how templates should be addressed when suggesting fixes.
 For instance, what should happe

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

2025-04-06 Thread Paul Heidekrüger via cfe-commits
paulhdk wrote: Gentle bump. Thank you for taking a look! https://github.com/llvm/llvm-project/pull/95220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits