clang-tools 6.0.0

Classes | Functions
clang::tidy::mpi Namespace Reference

## Classes
class | BufferDerefCheck
| This check verifies if a buffer passed to an MPI (Message Passing Interface) function is sufficiently dereferenced. More...
class | MPIModule
class | TypeMismatchCheck
| This check verifies if buffer type and MPI (Message Passing Interface) datatype pairs match. More...

## Functions
static bool | isMPITypeMatching (const std::multimap< BuiltinType::Kind, std::string > &MultiMap, const BuiltinType::Kind Kind, const std::string &MPIDatatype)
| Check if a BuiltinType::Kind matches the MPI datatype. More...
static bool | isStandardMPIDatatype (const std::string &MPIDatatype)
| Check if the MPI datatype is a standard type. More...
static bool | isBuiltinTypeMatching (const BuiltinType *Builtin, std::string &BufferTypeName, const std::string &MPIDatatype, const LangOptions &LO)
| Check if a BuiltinType matches the MPI datatype. More...
static bool | isCComplexTypeMatching (const ComplexType *const Complex, std::string &BufferTypeName, const std::string &MPIDatatype, const LangOptions &LO)
| Check if a complex float/double/long double buffer type matches the MPI datatype. More...
static bool | isCXXComplexTypeMatching (const TemplateSpecializationType *const Template, std::string &BufferTypeName, const std::string &MPIDatatype, const LangOptions &LO)
| Check if a complex<float/double/long double> templated buffer type matches the MPI datatype. More...
static bool | isTypedefTypeMatching (const TypedefType *const Typedef, std::string &BufferTypeName, const std::string &MPIDatatype)
| Check if a fixed size width buffer type matches the MPI datatype. More...
static const Type * | argumentType (const CallExpr *const CE, const size_t idx)
| Get the unqualified, dereferenced type of an argument. More...

## Function Documentation

## ◆ argumentType()

static const Type* clang::tidy::mpi::argumentType | ( | const CallExpr *const | CE,
|  | const size_t | idx
| ) |  |
| static

Get the unqualified, dereferenced type of an argument.

Parameters

  CE | call expression
  idx | argument index

Returns
  type of the argument

Definition at line 235 of file TypeMismatchCheck.cpp.

Referenced by clang::tidy::mpi::TypeMismatchCheck::check().

## ◆ isBuiltinTypeMatching()

static bool clang::tidy::mpi::isBuiltinTypeMatching | ( | const BuiltinType * | Builtin,
|  | std::string & | BufferTypeName,
|  | const std::string & | MPIDatatype,
|  | const LangOptions & | LO
| ) |  |
| static

Check if a BuiltinType matches the MPI datatype.

Parameters

  Builtin | the builtin type
  BufferTypeName | buffer type name, gets assigned
  MPIDatatype | name of the MPI datatype
  LO | language options

Returns
  true if the type matches

Definition at line 95 of file TypeMismatchCheck.cpp.

References isMPITypeMatching().

Referenced by clang::tidy::mpi::TypeMismatchCheck::check().

## ◆ isCComplexTypeMatching()

static bool clang::tidy::mpi::isCComplexTypeMatching | ( | const ComplexType *const | Complex,
|  | std::string & | BufferTypeName,
|  | const std::string & | MPIDatatype,
|  | const LangOptions & | LO
| ) |  |
| static

Check if a complex float/double/long double buffer type matches the MPI datatype.

Parameters

  Complex | buffer type
  BufferTypeName | buffer type name, gets assigned
  MPIDatatype | name of the MPI datatype
  LO | language options

Returns
  true if the type matches or the buffer type is unknown

Definition at line 148 of file TypeMismatchCheck.cpp.

References isMPITypeMatching().

Referenced by clang::tidy::mpi::TypeMismatchCheck::check().

## ◆ isCXXComplexTypeMatching()

static bool clang::tidy::mpi::isCXXComplexTypeMatching | ( | const TemplateSpecializationType *const | Template,
|  | std::string & | BufferTypeName,
|  | const std::string & | MPIDatatype,
|  | const LangOptions & | LO
| ) |  |
| static

Check if a complex<float/double/long double> templated buffer type matches the MPI datatype.

Parameters

  Template | buffer type
  BufferTypeName | buffer type name, gets assigned
  MPIDatatype | name of the MPI datatype
  LO | language options

Returns
  true if the type matches or the buffer type is unknown

Definition at line 179 of file TypeMismatchCheck.cpp.

References isMPITypeMatching().

Referenced by clang::tidy::mpi::TypeMismatchCheck::check().

## ◆ isMPITypeMatching()

static bool clang::tidy::mpi::isMPITypeMatching | ( | const std::multimap< BuiltinType::Kind, std::string > & | MultiMap,
|  | const BuiltinType::Kind | Kind,
|  | const std::string & | MPIDatatype
| ) |  |
| static

Check if a BuiltinType::Kind matches the MPI datatype.

Parameters

  MultiMap | datatype group
  Kind | buffer type kind
  MPIDatatype | name of the MPI datatype

Returns
  true if the pair matches

Definition at line 31 of file TypeMismatchCheck.cpp.

Referenced by isBuiltinTypeMatching(), isCComplexTypeMatching(), and isCXXComplexTypeMatching().

## ◆ isStandardMPIDatatype()

static bool clang::tidy::mpi::isStandardMPIDatatype | ( | const std::string & | MPIDatatype | ) |
| static

Check if the MPI datatype is a standard type.

Parameters

  MPIDatatype | name of the MPI datatype

Returns
  true if the type is a standard type

Definition at line 48 of file TypeMismatchCheck.cpp.

Referenced by clang::tidy::mpi::TypeMismatchCheck::check().

## ◆ isTypedefTypeMatching()

static bool clang::tidy::mpi::isTypedefTypeMatching | ( | const TypedefType *const | Typedef,
|  | std::string & | BufferTypeName,
|  | const std::string & | MPIDatatype
| ) |  |
| static

Check if a fixed size width buffer type matches the MPI datatype.

Parameters

  Typedef | buffer type
  BufferTypeName | buffer type name, gets assigned
  MPIDatatype | name of the MPI datatype

Returns
  true if the type matches or the buffer type is unknown

Definition at line 211 of file TypeMismatchCheck.cpp.

Referenced by clang::tidy::mpi::TypeMismatchCheck::check().