clang 8.0.0

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:
[legend]

## Classes
struct | ValueInfo

## Public Member Functions
| ComparisonCategoryInfo (const ASTContext &Ctx, CXXRecordDecl *RD, ComparisonCategoryType Kind)
QualType | getType () const
const ValueInfo * | getValueInfo (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 ValueInfo * | getEqualOrEquiv () const
const ValueInfo * | getNonequalOrNonequiv () const
const ValueInfo * | getLess () const
const ValueInfo * | getGreater () const
const ValueInfo * | getUnordered () const

## Public Attributes
CXXRecordDecl * | Record = 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 68 of file ComparisonCategories.h.

## Constructor & Destructor Documentation

## ◆ ComparisonCategoryInfo()

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

Definition at line 73 of file ComparisonCategories.h.

## Member Function Documentation

## ◆ getEqualOrEquiv()

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

Definition at line 166 of file ComparisonCategories.h.

## ◆ getGreater()

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

Definition at line 177 of file ComparisonCategories.h.

## ◆ getLess()

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

Definition at line 173 of file ComparisonCategories.h.

## ◆ getNonequalOrNonequiv()

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

Definition at line 169 of file ComparisonCategories.h.

## ◆ getType()

QualType ComparisonCategoryInfo::getType | ( |  | ) | const

Definition at line 146 of file ComparisonCategories.cpp.

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

## ◆ getUnordered()

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

Definition at line 181 of file ComparisonCategories.h.

## ◆ getValueInfo()

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

Definition at line 120 of file ComparisonCategories.h.

References clang::ComparisonCategoryInfo::ValueInfo::hasValidIntValue().

Referenced by EvaluateComparisonBinaryOperator().

## ◆ isEquality()

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

True iff the comparison category is an equality comparison.

Definition at line 130 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 133 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 147 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 141 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 155 of file ComparisonCategories.h.

Referenced by EvaluateComparisonBinaryOperator().

## Friends And Related Function Documentation

## ◆ ComparisonCategories

friend class ComparisonCategories
| friend

Definition at line 69 of file ComparisonCategories.h.

## ◆ Sema

friend class Sema
| friend

Definition at line 70 of file ComparisonCategories.h.

## Member Data Documentation

## ◆ Kind

ComparisonCategoryType clang::ComparisonCategoryInfo::Kind

The Kind of the comparison category type.

Definition at line 115 of file ComparisonCategories.h.

## ◆ Record

CXXRecordDecl* clang::ComparisonCategoryInfo::Record = nullptr

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

Definition at line 112 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:

- include/clang/AST/ComparisonCategories.h
- lib/AST/ComparisonCategories.cpp