clang API Documentation
Wrapper for void* pointer. More...
#include <Ownership.h>
Public Member Functions | |
OpaquePtr () | |
template<typename PointeeT > | |
PointeeT * | getPtrTo () const |
Returns plain pointer to the entity pointed by this wrapper. | |
template<typename PtrT > | |
PtrT | getPtrAs () const |
Returns pointer converted to the specified type. | |
PtrTy | get () const |
void | set (PtrTy P) |
LLVM_EXPLICIT | 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 45 of file Ownership.h.
clang::OpaquePtr< PtrTy >::OpaquePtr | ( | ) | [inline] |
Definition at line 52 of file Ownership.h.
Referenced by clang::OpaquePtr< TemplateName >::getFromOpaquePtr().
PtrTy clang::OpaquePtr< PtrTy >::get | ( | ) | const [inline] |
Definition at line 74 of file Ownership.h.
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnCXXNestedNameSpecifier(), clang::Sema::ActOnDeclStmt(), clang::Sema::ActOnDependentTemplateName(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnForEachDeclStmt(), clang::Sema::ActOnPackExpansion(), clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTemplateIdType(), clang::Sema::ActOnTypenameType(), clang::Sema::CodeCompleteDeclSpec(), clang::Sema::CodeCompleteObjCForCollection(), clang::Sema::containsUnexpandedParameterPacks(), clang::Sema::DecomposeUnqualifiedId(), clang::Sema::DiagnoseUnknownTypeName(), clang::Sema::GetNameFromUnqualifiedId(), clang::Sema::GetTypeFromParser(), clang::Sema::getTypeName(), clang::Declarator::isDeclarationOfFunction(), clang::Sema::isTemplateName(), clang::ParseAST(), clang::Sema::ParsedFreeStandingDeclSpec(), clang::TreeTransform< Derived >::RebuildTemplateName(), and translateTemplateArgument().
void* clang::OpaquePtr< PtrTy >::getAsOpaquePtr | ( | ) | const [inline] |
Definition at line 84 of file Ownership.h.
Referenced by clang::Sema::CodeCompleteObjCForCollection(), llvm::PointerLikeTypeTraits< clang::OpaquePtr< T > >::getAsVoidPointer(), clang::UnionOpaquePtr< QualType >::make(), and clang::UnionOpaquePtr< QualType >::operator=().
static OpaquePtr clang::OpaquePtr< PtrTy >::getFromOpaquePtr | ( | void * | P | ) | [inline, static] |
Definition at line 85 of file Ownership.h.
PtrT clang::OpaquePtr< PtrTy >::getPtrAs | ( | ) | const [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 70 of file Ownership.h.
PointeeT* clang::OpaquePtr< PtrTy >::getPtrTo | ( | ) | const [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 60 of file Ownership.h.
static OpaquePtr clang::OpaquePtr< PtrTy >::make | ( | PtrTy | P | ) | [inline, static] |
Definition at line 54 of file Ownership.h.
Referenced by clang::Sema::ActOnOpenMPThreadprivateDirective().
LLVM_EXPLICIT clang::OpaquePtr< PtrTy >::operator bool | ( | ) | const [inline] |
Definition at line 82 of file Ownership.h.
void clang::OpaquePtr< PtrTy >::set | ( | PtrTy | P | ) | [inline] |
Definition at line 78 of file Ownership.h.
Referenced by clang::OpaquePtr< TemplateName >::make().