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

Paul Heidekrüger via cfe-commits cfe-commits at lists.llvm.org
Sat May 10 10:31:42 PDT 2025


================
@@ -0,0 +1,227 @@
+// RUN: %check_clang_tidy -std=c++2b -check-suffix=DEFAULT %s \
----------------
paulhdk wrote:

Again, good catch.

We have that in there because for some of our tests, we overload the subscript operator to take no arguments, which is a C++23 feature. See my comment here: https://github.com/llvm/llvm-project/pull/95220#discussion_r1955916314 as @carlosgalvezp had noticed this too.

Correct me if I'm wrong, but to my knowledge we cannot specified the C++23 dependency for the tests individually, but would have to have a new file with new run commands. Or is there a more elegant way?

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


More information about the cfe-commits mailing list