xref: /llvm-project/clang-tools-extra/clang-tidy/altera/KernelNameRestrictionCheck.h (revision 4718da506091a37ca4863d979bc541e359b79b10)
19ca6fc4eSFrank Derry Wanye //===--- KernelNameRestrictionCheck.h - clang-tidy --------------*- C++ -*-===//
29ca6fc4eSFrank Derry Wanye //
39ca6fc4eSFrank Derry Wanye // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
49ca6fc4eSFrank Derry Wanye // See https://llvm.org/LICENSE.txt for license information.
59ca6fc4eSFrank Derry Wanye // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
69ca6fc4eSFrank Derry Wanye //
79ca6fc4eSFrank Derry Wanye //===----------------------------------------------------------------------===//
89ca6fc4eSFrank Derry Wanye 
99ca6fc4eSFrank Derry Wanye #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ALTERA_KERNEL_NAME_RESTRICTION_CHECK_H
109ca6fc4eSFrank Derry Wanye #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ALTERA_KERNEL_NAME_RESTRICTION_CHECK_H
119ca6fc4eSFrank Derry Wanye 
129ca6fc4eSFrank Derry Wanye #include "../ClangTidyCheck.h"
139ca6fc4eSFrank Derry Wanye 
14*4718da50SCarlos Galvez namespace clang::tidy::altera {
159ca6fc4eSFrank Derry Wanye 
169ca6fc4eSFrank Derry Wanye /// Finds kernel files and include directives whose filename is `kernel.cl`,
179ca6fc4eSFrank Derry Wanye /// `Verilog.cl`, or `VHDL.cl`.
189ca6fc4eSFrank Derry Wanye ///
199ca6fc4eSFrank Derry Wanye /// For the user-facing documentation see:
206e566bc5SRichard /// http://clang.llvm.org/extra/clang-tidy/checks/altera/kernel-name-restriction.html
219ca6fc4eSFrank Derry Wanye class KernelNameRestrictionCheck : public ClangTidyCheck {
229ca6fc4eSFrank Derry Wanye public:
KernelNameRestrictionCheck(StringRef Name,ClangTidyContext * Context)239ca6fc4eSFrank Derry Wanye   KernelNameRestrictionCheck(StringRef Name, ClangTidyContext *Context)
249ca6fc4eSFrank Derry Wanye       : ClangTidyCheck(Name, Context) {}
259ca6fc4eSFrank Derry Wanye   void registerPPCallbacks(const SourceManager &SM, Preprocessor *PP,
269ca6fc4eSFrank Derry Wanye                            Preprocessor *) override;
279ca6fc4eSFrank Derry Wanye };
289ca6fc4eSFrank Derry Wanye 
29*4718da50SCarlos Galvez } // namespace clang::tidy::altera
309ca6fc4eSFrank Derry Wanye 
319ca6fc4eSFrank Derry Wanye #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ALTERA_KERNEL_NAME_RESTRICTION_CHECK_H
32