clang  14.0.0git
Public Member Functions | Public Attributes | List of all members
clang::ComparisonCategoryInfo::ValueInfo Struct Reference

#include "clang/AST/ComparisonCategories.h"

Collaboration diagram for clang::ComparisonCategoryInfo::ValueInfo:
Collaboration graph
[legend]

Public Member Functions

 ValueInfo (ComparisonCategoryResult Kind, VarDecl *VD)
 
bool hasValidIntValue () const
 True iff we've successfully evaluated the variable as a constant expression and extracted its integer value. More...
 
llvm::APSInt getIntValue () const
 Get the constant integer value used by this variable to represent the comparison category result type. More...
 

Public Attributes

ComparisonCategoryResult Kind
 
VarDeclVD
 

Detailed Description

Definition at line 84 of file ComparisonCategories.h.

Constructor & Destructor Documentation

◆ ValueInfo()

clang::ComparisonCategoryInfo::ValueInfo::ValueInfo ( ComparisonCategoryResult  Kind,
VarDecl VD 
)
inline

Definition at line 88 of file ComparisonCategories.h.

Member Function Documentation

◆ getIntValue()

llvm::APSInt ComparisonCategoryInfo::ValueInfo::getIntValue ( ) const

Get the constant integer value used by this variable to represent the comparison category result type.

Attempt to determine the integer value used to represent the comparison category result by evaluating the initializer for the specified VarDecl as a constant expression and retrieving the value of the class's first (and only) field.

Note: The STL types are expected to have the form: struct X { T value; }; where T is an integral or enumeration type.

Definition at line 66 of file ComparisonCategories.cpp.

◆ hasValidIntValue()

bool ComparisonCategoryInfo::ValueInfo::hasValidIntValue ( ) const

Member Data Documentation

◆ Kind

ComparisonCategoryResult clang::ComparisonCategoryInfo::ValueInfo::Kind

Definition at line 85 of file ComparisonCategories.h.

◆ VD

VarDecl* clang::ComparisonCategoryInfo::ValueInfo::VD

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