clang-tools  14.0.0git
Public Member Functions | Public Attributes | List of all members
clang::tidy::bugprone::model::MixData Struct Reference

Contains the metadata for the mixability result between two types, independently of which parameters they were calculated from. More...

Collaboration diagram for clang::tidy::bugprone::model::MixData:
Collaboration graph
[legend]

Public Member Functions

 MixData (MixFlags Flags)
 
 MixData (MixFlags Flags, QualType CommonType)
 
 MixData (MixFlags Flags, ConversionSequence Conv)
 
 MixData (MixFlags Flags, ConversionSequence LTR, ConversionSequence RTL)
 
 MixData (MixFlags Flags, QualType CommonType, ConversionSequence LTR, ConversionSequence RTL)
 
void sanitize ()
 
bool isValid () const
 
bool indicatesMixability () const
 
MixData operator| (MixFlags EnableFlags) const
 Add the specified flag bits to the flags. More...
 
MixDataoperator|= (MixFlags EnableFlags)
 Add the specified flag bits to the flags. More...
 
template<class F >
MixData withCommonTypeTransformed (F &&Func) const
 

Public Attributes

MixFlags Flags = MixFlags::Invalid
 The flag bits of the mix indicating what language features allow for it. More...
 
QualType CommonType
 A potentially calculated common underlying type after desugaring, that both sides of the mix can originate from. More...
 
ConversionSequence Conversion
 The steps an implicit conversion performs to get from one type to the other. More...
 
ConversionSequence ConversionRTL
 
bool CreatedFromOneWayConversion = false
 True if the MixData was specifically created with only a one-way conversion modelled. More...
 

Detailed Description

Contains the metadata for the mixability result between two types, independently of which parameters they were calculated from.

Definition at line 379 of file EasilySwappableParametersCheck.cpp.

Constructor & Destructor Documentation

◆ MixData() [1/5]

clang::tidy::bugprone::model::MixData::MixData ( MixFlags  Flags)
inline

Definition at line 395 of file EasilySwappableParametersCheck.cpp.

◆ MixData() [2/5]

clang::tidy::bugprone::model::MixData::MixData ( MixFlags  Flags,
QualType  CommonType 
)
inline

Definition at line 396 of file EasilySwappableParametersCheck.cpp.

◆ MixData() [3/5]

clang::tidy::bugprone::model::MixData::MixData ( MixFlags  Flags,
ConversionSequence  Conv 
)
inline

Definition at line 398 of file EasilySwappableParametersCheck.cpp.

◆ MixData() [4/5]

clang::tidy::bugprone::model::MixData::MixData ( MixFlags  Flags,
ConversionSequence  LTR,
ConversionSequence  RTL 
)
inline

Definition at line 400 of file EasilySwappableParametersCheck.cpp.

◆ MixData() [5/5]

clang::tidy::bugprone::model::MixData::MixData ( MixFlags  Flags,
QualType  CommonType,
ConversionSequence  LTR,
ConversionSequence  RTL 
)
inline

Definition at line 402 of file EasilySwappableParametersCheck.cpp.

Member Function Documentation

◆ indicatesMixability()

bool clang::tidy::bugprone::model::MixData::indicatesMixability ( ) const
inline

Definition at line 454 of file EasilySwappableParametersCheck.cpp.

References Flags.

◆ isValid()

bool clang::tidy::bugprone::model::MixData::isValid ( ) const
inline

Definition at line 452 of file EasilySwappableParametersCheck.cpp.

References Flags.

◆ operator|()

MixData clang::tidy::bugprone::model::MixData::operator| ( MixFlags  EnableFlags) const
inline

Add the specified flag bits to the flags.

Definition at line 457 of file EasilySwappableParametersCheck.cpp.

References CommonType, Flags, and M.

◆ operator|=()

MixData& clang::tidy::bugprone::model::MixData::operator|= ( MixFlags  EnableFlags)
inline

Add the specified flag bits to the flags.

Definition at line 467 of file EasilySwappableParametersCheck.cpp.

References Flags.

◆ sanitize()

void clang::tidy::bugprone::model::MixData::sanitize ( )
inline

◆ withCommonTypeTransformed()

template<class F >
MixData clang::tidy::bugprone::model::MixData::withCommonTypeTransformed ( F &&  Func) const
inline

Definition at line 472 of file EasilySwappableParametersCheck.cpp.

Member Data Documentation

◆ CommonType

QualType clang::tidy::bugprone::model::MixData::CommonType

A potentially calculated common underlying type after desugaring, that both sides of the mix can originate from.

Definition at line 385 of file EasilySwappableParametersCheck.cpp.

◆ Conversion

ConversionSequence clang::tidy::bugprone::model::MixData::Conversion

The steps an implicit conversion performs to get from one type to the other.

Definition at line 389 of file EasilySwappableParametersCheck.cpp.

◆ ConversionRTL

ConversionSequence clang::tidy::bugprone::model::MixData::ConversionRTL

Definition at line 389 of file EasilySwappableParametersCheck.cpp.

◆ CreatedFromOneWayConversion

bool clang::tidy::bugprone::model::MixData::CreatedFromOneWayConversion = false

True if the MixData was specifically created with only a one-way conversion modelled.

Definition at line 393 of file EasilySwappableParametersCheck.cpp.

◆ Flags

MixFlags clang::tidy::bugprone::model::MixData::Flags = MixFlags::Invalid

The flag bits of the mix indicating what language features allow for it.

Definition at line 381 of file EasilySwappableParametersCheck.cpp.


The documentation for this struct was generated from the following file: