clang 22.0.0git
clang::CanProxyBase< T > Class Template Reference

Base class of all canonical proxy types, which is responsible for storing the underlying canonical type and providing basic conversions. More...

#include "clang/AST/CanonicalType.h"

Inheritance diagram for clang::CanProxyBase< T >:
[legend]

Public Member Functions

const TgetTypePtr () const
 Retrieve the pointer to the underlying Type.
 operator const T * () const
 Implicit conversion to the underlying pointer.
template<typename U>
CanProxy< UgetAs () const
 Try to convert the given canonical type to a specific structural type.
const CanProxyAdaptor< T > * operator-> () const
 Retrieve the proxy-adaptor type.

Protected Attributes

CanQual< TStored

Detailed Description

template<typename T>
class clang::CanProxyBase< T >

Base class of all canonical proxy types, which is responsible for storing the underlying canonical type and providing basic conversions.

Definition at line 240 of file CanonicalType.h.

Member Function Documentation

◆ getAs()

template<typename T>
template<typename U>
CanProxy< U > clang::CanProxyBase< T >::getAs ( ) const
inline

Try to convert the given canonical type to a specific structural type.

Definition at line 259 of file CanonicalType.h.

References getAs().

Referenced by getAs().

◆ getTypePtr()

template<typename T>
const T * clang::CanProxyBase< T >::getTypePtr ( ) const
inline

◆ operator const T *()

template<typename T>
clang::CanProxyBase< T >::operator const T * ( ) const
inline

Implicit conversion to the underlying pointer.

Also provides the ability to use canonical type proxies in a Boolean

if (CanQual<PointerType> Ptr = T->getAs<PointerType>()) { ... }
Represents a canonical, potentially-qualified type.
PointerType - C99 6.7.5.1 - Pointer Declarators.
Definition TypeBase.h:3328
const FunctionProtoType * T

Definition at line 255 of file CanonicalType.h.

◆ operator->()

template<typename T>
const CanProxyAdaptor< T > * clang::CanProxyBase< T >::operator-> ( ) const
inline

Retrieve the proxy-adaptor type.

This arrow operator is used when CanProxyAdaptor has been specialized for the given type T. In that case, we reference members of the CanProxyAdaptor specialization. Otherwise, this operator will be hidden by the arrow operator in the primary CanProxyAdaptor template.

Definition at line 324 of file CanonicalType.h.

References clang::T.

Member Data Documentation

◆ Stored

template<typename T>
CanQual<T> clang::CanProxyBase< T >::Stored
protected

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