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

#include "clang/AST/ComparisonCategories.h"

Classes

struct  ValueInfo
 

Public Member Functions

 ComparisonCategoryInfo (const ASTContext &Ctx, const CXXRecordDecl *RD, ComparisonCategoryType Kind)
 
QualType getType () const
 
const ValueInfogetValueInfo (ComparisonCategoryResult ValueKind) const
 
bool isStrong () const
 True iff the comparison is "strong".
 
bool isPartial () const
 True iff the comparison is not totally ordered.
 
ComparisonCategoryResult makeWeakResult (ComparisonCategoryResult Res) const
 Converts the specified result kind into the correct result kind for this category.
 
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.
 
ComparisonCategoryType Kind
 The Kind of the comparison category type.
 

Friends

class ComparisonCategories
 
class Sema
 

Detailed Description

Definition at line 76 of file ComparisonCategories.h.

Constructor & Destructor Documentation

◆ ComparisonCategoryInfo()

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

Definition at line 81 of file ComparisonCategories.h.

Member Function Documentation

◆ getEqualOrEquiv()

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

Definition at line 159 of file ComparisonCategories.h.

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

◆ getGreater()

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

Definition at line 165 of file ComparisonCategories.h.

References getValueInfo(), and clang::Greater.

◆ getLess()

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

Definition at line 162 of file ComparisonCategories.h.

References getValueInfo(), and clang::Less.

◆ getType()

QualType ComparisonCategoryInfo::getType ( ) const

Definition at line 167 of file ComparisonCategories.cpp.

Referenced by clang::Sema::CheckComparisonCategoryType().

◆ getUnordered()

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

Definition at line 168 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 144 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 138 of file ComparisonCategories.h.

References Kind.

Referenced by clang::Sema::BuildSynthesizedThreeWayComparison(), and 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 152 of file ComparisonCategories.h.

References isStrong().

Referenced by clang::interp::CMP3(), and getEqualOrEquiv().

Friends And Related Function Documentation

◆ ComparisonCategories

friend class ComparisonCategories
friend

Definition at line 77 of file ComparisonCategories.h.

◆ Sema

friend class Sema
friend

Definition at line 78 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 119 of file ComparisonCategories.h.

Referenced by clang::Sema::CheckComparisonCategoryType(), and clang::ComparisonCategories::lookupInfoForType().


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