clang 10.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:
[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 | 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 * | 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 74 of file ComparisonCategories.h.

## Constructor & Destructor Documentation

## ◆ ComparisonCategoryInfo()

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

Definition at line 79 of file ComparisonCategories.h.

## Member Function Documentation

## ◆ getEqualOrEquiv()

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

Definition at line 158 of file ComparisonCategories.h.

## ◆ getGreater()

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

Definition at line 164 of file ComparisonCategories.h.

## ◆ getLess()

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

Definition at line 161 of file ComparisonCategories.h.

## ◆ getType()

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

Definition at line 165 of file ComparisonCategories.cpp.

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

## ◆ getUnordered()

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

Definition at line 167 of file ComparisonCategories.h.

## ◆ getValueInfo()

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

Definition at line 126 of file ComparisonCategories.h.

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

Referenced by EvaluateComparisonBinaryOperator().

## ◆ isPartial()

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

True iff the comparison is not totally ordered.

Definition at line 143 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 137 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 151 of file ComparisonCategories.h.

Referenced by EvaluateComparisonBinaryOperator().

## Friends And Related Function Documentation

## ◆ ComparisonCategories

friend class ComparisonCategories
| friend

Definition at line 75 of file ComparisonCategories.h.

## ◆ Sema

friend class Sema
| friend

Definition at line 76 of file ComparisonCategories.h.

## Member Data Documentation

## ◆ Kind

ComparisonCategoryType clang::ComparisonCategoryInfo::Kind

The Kind of the comparison category type.

Definition at line 121 of file ComparisonCategories.h.

## ◆ Record

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::ComparisonCategoryInfo::ValueInfo::getIntValue(), getType(), clang::ComparisonCategoryInfo::ValueInfo::hasValidIntValue(), and clang::ComparisonCategories::lookupInfoForType().

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

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