clang-tools
22.0.0git
llvm-project
clang-tools-extra
clang-tidy
llvm
UseNewMLIROpBuilderCheck.h
Go to the documentation of this file.
1
//===--- UseNewMLIROpBuilderCheck.h - clang-tidy ----------------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_USENEWMLIROPBUILDERCHECK_H
10
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_USENEWMLIROPBUILDERCHECK_H
11
12
#include "
../utils/TransformerClangTidyCheck.h
"
13
14
namespace
clang::tidy::llvm_check
{
15
16
/// Checks for uses of MLIR's old/to be deprecated `OpBuilder::create<T>` form
17
/// and suggests using `T::create` instead.
18
class
UseNewMlirOpBuilderCheck
:
public
utils::TransformerClangTidyCheck
{
19
public
:
20
UseNewMlirOpBuilderCheck
(StringRef Name,
ClangTidyContext
*Context);
21
22
bool
isLanguageVersionSupported
(
const
LangOptions &LangOpts)
const override
{
23
return
getLangOpts().CPlusPlus;
24
}
25
};
26
27
}
// namespace clang::tidy::llvm_check
28
29
#endif
// LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_USENEWMLIROPBUILDERCHECK_H
TransformerClangTidyCheck.h
clang::tidy::ClangTidyContext
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
Definition
ClangTidyDiagnosticConsumer.h:69
clang::tidy::llvm_check::UseNewMlirOpBuilderCheck::UseNewMlirOpBuilderCheck
UseNewMlirOpBuilderCheck(StringRef Name, ClangTidyContext *Context)
Definition
UseNewMLIROpBuilderCheck.cpp:134
clang::tidy::llvm_check::UseNewMlirOpBuilderCheck::isLanguageVersionSupported
bool isLanguageVersionSupported(const LangOptions &LangOpts) const override
Definition
UseNewMLIROpBuilderCheck.h:22
clang::tidy::utils::TransformerClangTidyCheck
A base class for defining a ClangTidy check based on a RewriteRule.
Definition
TransformerClangTidyCheck.h:38
clang::tidy::llvm_check
Definition
HeaderGuardCheck.cpp:13
Generated on
for clang-tools by
1.14.0