clang 19.0.0git
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'.
 
const ComparisonCategoryInfogetInfoForType (QualType Ty) const
 Return the comparison category information as specified by getCategoryForType(Ty).
 
const ComparisonCategoryInfolookupInfo (ComparisonCategoryType Kind) const
 Return the cached comparison category information for the specified 'Kind'.
 
ComparisonCategoryInfolookupInfo (ComparisonCategoryType Kind)
 
const ComparisonCategoryInfolookupInfoForType (QualType Ty) const
 

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.
 

Friends

class ASTContext
 

Detailed Description

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

References lookupInfo(), and clang::Result.

◆ 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 161 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 203 of file ComparisonCategories.cpp.

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

◆ getResultString()

StringRef ComparisonCategories::getResultString ( ComparisonCategoryResult  Kind)
static

◆ lookupInfo() [1/2]

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

Definition at line 207 of file ComparisonCategories.h.

◆ lookupInfo() [2/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 113 of file ComparisonCategories.cpp.

References clang::Data, clang::ComparisonCategoryInfo::Kind, lookupCXXRecordDecl(), and lookupStdNamespace().

Referenced by clang::Sema::CheckComparisonCategoryType(), and getInfo().

◆ lookupInfoForType()

const ComparisonCategoryInfo * ComparisonCategories::lookupInfoForType ( QualType  Ty) const

Friends And Related Function Documentation

◆ ASTContext

friend class ASTContext
friend

Definition at line 215 of file ComparisonCategories.h.


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