clang  10.0.0svn
Public Member Functions | Static Public Member Functions | Friends | List of all members
clang::ComparisonCategories Class Reference

#include "clang/AST/ComparisonCategories.h"

Public Member Functions

const ComparisonCategoryInfogetInfo (ComparisonCategoryType Kind) const
 Return the comparison category information for the category specified by 'Kind'. More...
 
const ComparisonCategoryInfogetInfoForType (QualType Ty) const
 Return the comparison category information as specified by getCategoryForType(Ty). More...
 
const ComparisonCategoryInfolookupInfo (ComparisonCategoryType Kind) const
 Return the cached comparison category information for the specified 'Kind'. More...
 
ComparisonCategoryInfolookupInfo (ComparisonCategoryType Kind)
 

Static Public Member Functions

static StringRef getCategoryString (ComparisonCategoryType Kind)
 
static StringRef getResultString (ComparisonCategoryResult Kind)
 
static std::vector< ComparisonCategoryResultgetPossibleResultsForType (ComparisonCategoryType Type)
 Return the list of results which are valid for the specified comparison category type. More...
 

Friends

class ASTContext
 

Detailed Description

Definition at line 186 of file ComparisonCategories.h.

Member Function Documentation

◆ getCategoryString()

StringRef ComparisonCategories::getCategoryString ( ComparisonCategoryType  Kind)
static

◆ getInfo()

const ComparisonCategoryInfo& clang::ComparisonCategories::getInfo ( ComparisonCategoryType  Kind) const
inline

Return the comparison category information for the category specified by 'Kind'.

Definition at line 198 of file ComparisonCategories.h.

◆ getInfoForType()

const ComparisonCategoryInfo & ComparisonCategories::getInfoForType ( QualType  Ty) const

Return the comparison category information as specified by getCategoryForType(Ty).

If the information is not already cached, the declaration is looked up and a cache entry is created. NOTE: Lookup is expected to succeed. Use lookupInfo if failure is possible.

Definition at line 139 of file ComparisonCategories.cpp.

◆ getPossibleResultsForType()

std::vector< ComparisonCategoryResult > ComparisonCategories::getPossibleResultsForType ( ComparisonCategoryType  Type)
static

Return the list of results which are valid for the specified comparison category type.

Definition at line 189 of file ComparisonCategories.cpp.

References clang::Equal, clang::Equivalent, clang::Greater, clang::Less, clang::Nonequal, clang::Nonequivalent, clang::PartialOrdering, clang::StrongEquality, clang::StrongOrdering, clang::Unordered, and clang::WeakOrdering.

◆ getResultString()

StringRef ComparisonCategories::getResultString ( ComparisonCategoryResult  Kind)
static

◆ lookupInfo() [1/2]

const ComparisonCategoryInfo * ComparisonCategories::lookupInfo ( ComparisonCategoryType  Kind) const

Return the cached comparison category information for the specified 'Kind'.

If no cache entry is present the comparison category type is looked up. If lookup fails nullptr is returned. Otherwise, a new cache entry is created and returned

Definition at line 91 of file ComparisonCategories.cpp.

References End, clang::First, clang::Type::getAsCXXRecordDecl(), clang::CXXRecordDecl::getCanonicalDecl(), clang::if(), clang::QualType::isNull(), clang::Last, lookupCXXRecordDecl(), lookupStdNamespace(), and clang::ComparisonCategoryInfo::Record.

◆ lookupInfo() [2/2]

ComparisonCategoryInfo* clang::ComparisonCategories::lookupInfo ( ComparisonCategoryType  Kind)
inline

Definition at line 219 of file ComparisonCategories.h.

Friends And Related Function Documentation

◆ ASTContext

friend class ASTContext
friend

Definition at line 228 of file ComparisonCategories.h.


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