clang  10.0.0svn
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 isEquality () const
 True iff the comparison category is an equality comparison. More...
 
bool isOrdered () const
 True iff the comparison category is a relational comparison. More...
 
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 the correct result kind for this category. More...
 
const ValueInfogetEqualOrEquiv () const
 
const ValueInfogetNonequalOrNonequiv () const
 
const ValueInfogetLess () const
 
const ValueInfogetGreater () const
 
const ValueInfogetUnordered () const
 

Public Attributes

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 67 of file ComparisonCategories.h.

Constructor & Destructor Documentation

◆ ComparisonCategoryInfo()

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

Definition at line 72 of file ComparisonCategories.h.

Member Function Documentation

◆ getEqualOrEquiv()

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

Definition at line 165 of file ComparisonCategories.h.

◆ getGreater()

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

Definition at line 176 of file ComparisonCategories.h.

◆ getLess()

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

Definition at line 172 of file ComparisonCategories.h.

◆ getNonequalOrNonequiv()

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

Definition at line 168 of file ComparisonCategories.h.

◆ getType()

QualType ComparisonCategoryInfo::getType ( ) const

Definition at line 145 of file ComparisonCategories.cpp.

References clang::TypeDecl::getTypeForDecl(), and Record.

◆ getUnordered()

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

Definition at line 180 of file ComparisonCategories.h.

◆ getValueInfo()

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

◆ isEquality()

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

True iff the comparison category is an equality comparison.

Definition at line 129 of file ComparisonCategories.h.

Referenced by EvaluateComparisonBinaryOperator().

◆ isOrdered()

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

True iff the comparison category is a relational comparison.

Definition at line 132 of file ComparisonCategories.h.

Referenced by EvaluateComparisonBinaryOperator().

◆ isPartial()

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

True iff the comparison is not totally ordered.

Definition at line 146 of file ComparisonCategories.h.

◆ isStrong()

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

True iff the comparison is "strong".

i.e. it checks equality and not equivalence.

Definition at line 140 of file ComparisonCategories.h.

◆ makeWeakResult()

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

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

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

Definition at line 154 of file ComparisonCategories.h.

Referenced by EvaluateComparisonBinaryOperator().

Friends And Related Function Documentation

◆ ComparisonCategories

friend class ComparisonCategories
friend

Definition at line 68 of file ComparisonCategories.h.

◆ Sema

friend class Sema
friend

Definition at line 69 of file ComparisonCategories.h.

Member Data Documentation

◆ Kind

ComparisonCategoryType clang::ComparisonCategoryInfo::Kind

The Kind of the comparison category type.

Definition at line 114 of file ComparisonCategories.h.

◆ Record

CXXRecordDecl* clang::ComparisonCategoryInfo::Record = nullptr

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

Definition at line 111 of file ComparisonCategories.h.

Referenced by clang::ComparisonCategoryInfo::ValueInfo::getIntValue(), getType(), clang::ComparisonCategoryInfo::ValueInfo::hasValidIntValue(), and clang::ComparisonCategories::lookupInfo().


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