clang  14.0.0git
Classes | Public Member Functions | Public Attributes | Friends | List of all members
clang::ComparisonCategoryInfo Class Reference

#include "clang/AST/ComparisonCategories.h"

Collaboration diagram for clang::ComparisonCategoryInfo:
Collaboration graph
[legend]

Classes

struct  ValueInfo
 

Public Member Functions

 ComparisonCategoryInfo (const ASTContext &Ctx, CXXRecordDecl *RD, ComparisonCategoryType Kind)
 
QualType getType () const
 
const ValueInfogetValueInfo (ComparisonCategoryResult ValueKind) const
 
bool isStrong () const
 True iff the comparison is "strong". More...
 
bool isPartial () const
 True iff the comparison is not totally ordered. More...
 
ComparisonCategoryResult makeWeakResult (ComparisonCategoryResult Res) const
 Converts the specified result kind into the correct result kind for this category. More...
 
const ValueInfogetEqualOrEquiv () const
 
const ValueInfogetLess () const
 
const ValueInfogetGreater () const
 
const ValueInfogetUnordered () const
 

Public Attributes

const CXXRecordDeclRecord = nullptr
 The declaration for the comparison category type from the standard library. More...
 
ComparisonCategoryType Kind
 The Kind of the comparison category type. More...
 

Friends

class ComparisonCategories
 
class Sema
 

Detailed Description

Definition at line 75 of file ComparisonCategories.h.

Constructor & Destructor Documentation

◆ ComparisonCategoryInfo()

clang::ComparisonCategoryInfo::ComparisonCategoryInfo ( const ASTContext Ctx,
CXXRecordDecl RD,
ComparisonCategoryType  Kind 
)
inline

Definition at line 80 of file ComparisonCategories.h.

Member Function Documentation

◆ getEqualOrEquiv()

const ValueInfo* clang::ComparisonCategoryInfo::getEqualOrEquiv ( ) const
inline

Definition at line 158 of file ComparisonCategories.h.

References clang::Equal, getValueInfo(), and makeWeakResult().

◆ getGreater()

const ValueInfo* clang::ComparisonCategoryInfo::getGreater ( ) const
inline

Definition at line 164 of file ComparisonCategories.h.

References getValueInfo(), and clang::Greater.

◆ getLess()

const ValueInfo* clang::ComparisonCategoryInfo::getLess ( ) const
inline

Definition at line 161 of file ComparisonCategories.h.

References getValueInfo(), and clang::Less.

◆ getType()

QualType ComparisonCategoryInfo::getType ( ) const

◆ getUnordered()

const ValueInfo* clang::ComparisonCategoryInfo::getUnordered ( ) const
inline

Definition at line 167 of file ComparisonCategories.h.

References getValueInfo(), isPartial(), and clang::Unordered.

◆ getValueInfo()

const ValueInfo* clang::ComparisonCategoryInfo::getValueInfo ( ComparisonCategoryResult  ValueKind) const
inline

◆ isPartial()

bool clang::ComparisonCategoryInfo::isPartial ( ) const
inline

True iff the comparison is not totally ordered.

Definition at line 143 of file ComparisonCategories.h.

References Kind.

Referenced by clang::Sema::BuildSynthesizedThreeWayComparison(), and getUnordered().

◆ isStrong()

bool clang::ComparisonCategoryInfo::isStrong ( ) const
inline

True iff the comparison is "strong".

i.e. it checks equality and not equivalence.

Definition at line 137 of file ComparisonCategories.h.

References Kind.

Referenced by makeWeakResult().

◆ makeWeakResult()

ComparisonCategoryResult clang::ComparisonCategoryInfo::makeWeakResult ( ComparisonCategoryResult  Res) const
inline

Converts the specified result kind into the correct result kind for this category.

Specifically it lowers strong equality results to weak equivalence if needed.

Definition at line 151 of file ComparisonCategories.h.

References isStrong().

Referenced by getEqualOrEquiv().

Friends And Related Function Documentation

◆ ComparisonCategories

friend class ComparisonCategories
friend

Definition at line 76 of file ComparisonCategories.h.

◆ Sema

friend class Sema
friend

Definition at line 77 of file ComparisonCategories.h.

Member Data Documentation

◆ Kind

ComparisonCategoryType clang::ComparisonCategoryInfo::Kind

◆ Record

const CXXRecordDecl* clang::ComparisonCategoryInfo::Record = nullptr

The declaration for the comparison category type from the standard library.

Definition at line 118 of file ComparisonCategories.h.

Referenced by clang::Sema::CheckComparisonCategoryType(), getType(), clang::ComparisonCategoryInfo::ValueInfo::hasValidIntValue(), and clang::ComparisonCategories::lookupInfoForType().


The documentation for this class was generated from the following files: