clang  20.0.0git
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
clang::FunctionEffectsRef Class Reference

An immutable set of FunctionEffects and possibly conditions attached to them. More...

#include "clang/AST/Type.h"

Public Types

using iterator = FunctionEffectIterator< FunctionEffectsRef >
 

Public Member Functions

 FunctionEffectsRef ()=default
 
bool empty () const
 
size_t size () const
 
ArrayRef< FunctionEffecteffects () const
 
ArrayRef< EffectConditionExprconditions () const
 
iterator begin () const
 
iterator end () const
 
void dump (llvm::raw_ostream &OS) const
 

Static Public Member Functions

static FunctionEffectsRef get (QualType QT)
 Extract the effects from a Type if it is a function, block, or member function pointer, or a reference or pointer to one. More...
 
static FunctionEffectsRef create (ArrayRef< FunctionEffect > FX, ArrayRef< EffectConditionExpr > Conds)
 Asserts invariants. More...
 

Public Attributes

friend iterator
 

Friends

bool operator== (const FunctionEffectsRef &LHS, const FunctionEffectsRef &RHS)
 
bool operator!= (const FunctionEffectsRef &LHS, const FunctionEffectsRef &RHS)
 

Detailed Description

An immutable set of FunctionEffects and possibly conditions attached to them.

The effects and conditions reside in memory not managed by this object (typically, trailing objects in FunctionProtoType, or borrowed references from a FunctionEffectSet).

Invariants:

Also, if there are any conditions, at least one of those expressions will be dependent, but this is only asserted in the constructor of FunctionProtoType.

See also FunctionEffectSet, in Sema, which provides a mutable set.

Definition at line 4892 of file Type.h.

Member Typedef Documentation

◆ iterator

Definition at line 4928 of file Type.h.

Constructor & Destructor Documentation

◆ FunctionEffectsRef()

clang::FunctionEffectsRef::FunctionEffectsRef ( )
default

Referenced by create().

Member Function Documentation

◆ begin()

iterator clang::FunctionEffectsRef::begin ( ) const
inline

◆ conditions()

ArrayRef<EffectConditionExpr> clang::FunctionEffectsRef::conditions ( ) const
inline

◆ create()

FunctionEffectsRef FunctionEffectsRef::create ( ArrayRef< FunctionEffect FX,
ArrayRef< EffectConditionExpr Conds 
)
static

Asserts invariants.

Definition at line 5335 of file Type.cpp.

References FunctionEffectsRef().

◆ dump()

LLVM_DUMP_METHOD void FunctionEffectsRef::dump ( llvm::raw_ostream &  OS) const

Definition at line 5312 of file Type.cpp.

References clang::Stmt::dump(), E, and clang::First.

Referenced by clang::FunctionEffectSet::dump().

◆ effects()

ArrayRef<FunctionEffect> clang::FunctionEffectsRef::effects ( ) const
inline

Definition at line 4925 of file Type.h.

◆ empty()

bool clang::FunctionEffectsRef::empty ( ) const
inline

◆ end()

iterator clang::FunctionEffectsRef::end ( ) const
inline

◆ get()

FunctionEffectsRef clang::FunctionEffectsRef::get ( QualType  QT)
inlinestatic

Extract the effects from a Type if it is a function, block, or member function pointer, or a reference or pointer to one.

Definition at line 8673 of file Type.h.

References clang::Type::getAs(), clang::Type::getPointeeType(), and clang::QualType::isNull().

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

◆ size()

size_t clang::FunctionEffectsRef::size ( ) const
inline

Definition at line 4923 of file Type.h.

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const FunctionEffectsRef LHS,
const FunctionEffectsRef RHS 
)
friend

Definition at line 4937 of file Type.h.

◆ operator==

bool operator== ( const FunctionEffectsRef LHS,
const FunctionEffectsRef RHS 
)
friend

Definition at line 4933 of file Type.h.

Member Data Documentation

◆ iterator

Definition at line 4929 of file Type.h.


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