clang-tools  8.0.0
SIMDIntrinsicsCheck.h
Go to the documentation of this file.
1 //===--- SIMDIntrinsicsCheck.h - clang-tidy----------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_SIMD_INTRINSICS_CHECK_H
11 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_SIMD_INTRINSICS_CHECK_H
12 
13 #include "../ClangTidy.h"
14 
15 #include "llvm/ADT/SmallString.h"
16 
17 namespace clang {
18 namespace tidy {
19 namespace portability {
20 
21 /// Find SIMD intrinsics calls and suggest std::experimental::simd alternatives.
22 ///
23 /// For the user-facing documentation see:
24 /// http://clang.llvm.org/extra/clang-tidy/checks/portability-simd-intrinsics.html
26 public:
27  SIMDIntrinsicsCheck(StringRef Name, ClangTidyContext *Context);
28 
29  void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
30  void registerMatchers(ast_matchers::MatchFinder *Finder) override;
31  void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
32 
33  private:
34  llvm::SmallString<32> Std;
35  const bool Suggest;
36 };
37 
38 } // namespace portability
39 } // namespace tidy
40 } // namespace clang
41 
42 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_SIMD_INTRINSICS_CHECK_H
Base class for all clang-tidy checks.
Definition: ClangTidy.h:127
SIMDIntrinsicsCheck(StringRef Name, ClangTidyContext *Context)
Find SIMD intrinsics calls and suggest std::experimental::simd alternatives.
static constexpr llvm::StringLiteral Name
std::map< std::string, std::string > OptionMap
llvm::Optional< llvm::Expected< tooling::AtomicChanges > > Result
void registerMatchers(ast_matchers::MatchFinder *Finder) override
Override this to register AST matchers with Finder.
void check(const ast_matchers::MatchFinder::MatchResult &Result) override
ClangTidyChecks that register ASTMatchers should do the actual work in here.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
void storeOptions(ClangTidyOptions::OptionMap &Opts) override
Should store all options supported by this check with their current values or default values for opti...