clang-tools 19.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...

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.
 
MixDataoperator|= (MixFlags EnableFlags)
 Add the specified flag bits to the flags.
 
template<typename F >
MixData withCommonTypeTransformed (const F &Func) const
 

Public Attributes

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

Detailed Description

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

Definition at line 389 of file EasilySwappableParametersCheck.cpp.

Constructor & Destructor Documentation

◆ MixData() [1/5]

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

Definition at line 405 of file EasilySwappableParametersCheck.cpp.

◆ MixData() [2/5]

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

Definition at line 406 of file EasilySwappableParametersCheck.cpp.

◆ MixData() [3/5]

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

Definition at line 408 of file EasilySwappableParametersCheck.cpp.

◆ MixData() [4/5]

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

Definition at line 410 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 412 of file EasilySwappableParametersCheck.cpp.

Member Function Documentation

◆ indicatesMixability()

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

◆ isValid()

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

◆ operator|()

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

Add the specified flag bits to the flags.

Definition at line 467 of file EasilySwappableParametersCheck.cpp.

References CommonType, Conversion, ConversionRTL, CreatedFromOneWayConversion, 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 477 of file EasilySwappableParametersCheck.cpp.

References Flags.

◆ sanitize()

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

◆ withCommonTypeTransformed()

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

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 395 of file EasilySwappableParametersCheck.cpp.

Referenced by clang::tidy::bugprone::model::Mix::commonUnderlyingType(), operator|(), and withCommonTypeTransformed().

◆ Conversion

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

◆ ConversionRTL

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

◆ 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 403 of file EasilySwappableParametersCheck.cpp.

Referenced by operator|(), sanitize(), and withCommonTypeTransformed().

◆ Flags

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

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