clang
8.0.0
|
Wrapper for void* pointer. More...
#include "clang/Sema/Ownership.h"
Public Member Functions | |
OpaquePtr (std::nullptr_t=nullptr) | |
template<typename PointeeT > | |
PointeeT * | getPtrTo () const |
Returns plain pointer to the entity pointed by this wrapper. More... | |
template<typename PtrT > | |
PtrT | getPtrAs () const |
Returns pointer converted to the specified type. More... | |
PtrTy | get () const |
void | set (PtrTy P) |
operator bool () const | |
void * | getAsOpaquePtr () const |
Static Public Member Functions | |
static OpaquePtr | make (PtrTy P) |
static OpaquePtr | getFromOpaquePtr (void *P) |
Wrapper for void* pointer.
PtrTy | Either a pointer type like 'T*' or a type that behaves like a pointer. |
This is a very simple POD type that wraps a pointer that the Parser doesn't know about but that Sema or another client does. The PtrTy template argument is used to make sure that "Decl" pointers are not compatible with "Type" pointers for example.
Definition at line 51 of file Ownership.h.
|
inline |
Definition at line 59 of file Ownership.h.
|
inline |
Definition at line 81 of file Ownership.h.
Referenced by clang::Sema::ActOnDeclStmt(), clang::Sema::ActOnForEachDeclStmt(), clang::Sema::ActOnOpenMPDeclareReductionDirectiveEnd(), clang::Sema::ActOnOpenMPDeclareSimdDirective(), clang::Sema::ActOnPackExpansion(), clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTemplateIdType(), clang::Sema::ActOnTypenameType(), clang::Sema::CheckDeductionGuideDeclarator(), clang::Sema::CodeCompleteObjCForCollection(), clang::Sema::containsUnexpandedParameterPacks(), clang::Sema::DecomposeUnqualifiedId(), clang::Sema::GetTypeFromParser(), clang::Parser::ParseUnqualifiedId(), takeDeclAttributes(), and translateTemplateArgument().
|
inline |
Definition at line 91 of file Ownership.h.
Referenced by clang::Sema::CodeCompleteObjCForCollection(), llvm::PointerLikeTypeTraits< clang::OpaquePtr< T > >::getAsVoidPointer(), clang::Parser::getTypeAnnotation(), clang::UnionOpaquePtr< TemplateName >::make(), and clang::UnionOpaquePtr< TemplateName >::operator=().
|
inlinestatic |
Definition at line 92 of file Ownership.h.
Referenced by clang::UnionOpaquePtr< TemplateName >::get(), and llvm::PointerLikeTypeTraits< clang::OpaquePtr< T > >::getFromVoidPointer().
|
inline |
Returns pointer converted to the specified type.
PtrT | Result pointer type. There must be implicit conversion from PtrTy to PtrT. |
In contrast to getPtrTo, this method allows the return type to be a smart pointer.
Definition at line 77 of file Ownership.h.
|
inline |
Returns plain pointer to the entity pointed by this wrapper.
PointeeT | Type of pointed entity. |
It is identical to getPtrAs<PointeeT*>.
Definition at line 67 of file Ownership.h.
|
inlinestatic |
Definition at line 61 of file Ownership.h.
|
inlineexplicit |
Definition at line 89 of file Ownership.h.
|
inline |
Definition at line 85 of file Ownership.h.
Referenced by clang::OpaquePtr< TemplateName >::make().