[clang-tools-extra] [clang-tidy] Add MLIR check for old op builder usage. (PR #149148)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Sat Jul 19 14:37:00 PDT 2025


================
@@ -0,0 +1,103 @@
+//===--- MLIROpBuilderCheck.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 "MLIROpBuilderCheck.h"
+#include "clang/ASTMatchers/ASTMatchers.h"
+#include "clang/Basic/LLVM.h"
+#include "clang/Lex/Lexer.h"
+#include "clang/Tooling/Transformer/RangeSelector.h"
+#include "clang/Tooling/Transformer/RewriteRule.h"
+#include "clang/Tooling/Transformer/SourceCode.h"
+#include "clang/Tooling/Transformer/Stencil.h"
+#include "llvm/Support/Error.h"
+
+namespace clang::tidy::llvm_check {
+namespace {
+
+using namespace ::clang::ast_matchers; // NOLINT: Too many names.
+using namespace ::clang::transformer;  // NOLINT: Too many names.
----------------
vbvictor wrote:

are NOLINT necessary? AFAIK there should be no `clang-tidy` warnings

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


More information about the cfe-commits mailing list