[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:46 PDT 2024


================
@@ -0,0 +1,81 @@
+//===--- AvoidBoundsErrorsCheck.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: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "AvoidBoundsErrorsCheck.h"
+#include "clang/ASTMatchers/ASTMatchFinder.h"
+#include "clang/Lex/Lexer.h"
+
+#include <iostream>
+using namespace clang::ast_matchers;
+
+namespace clang::tidy::cppcoreguidelines {
+
+bool isApplicable(const QualType &Type) {
----------------
EugeneZelenko wrote:

`static`?

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


More information about the cfe-commits mailing list