clang 20.0.0git
|
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. | |
template<typename PtrT > | |
PtrT | getPtrAs () const |
Returns pointer converted to the specified type. | |
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 50 of file Ownership.h.
|
inline |
Definition at line 58 of file Ownership.h.
|
inline |
Definition at line 80 of file Ownership.h.
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnCXXNestedNameSpecifier(), clang::Sema::ActOnDeclStmt(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnForEachDeclStmt(), clang::SemaOpenMP::ActOnOpenMPDeclareMapperType(), clang::SemaOpenMP::ActOnOpenMPDeclareReductionDirectiveEnd(), clang::SemaOpenMP::ActOnOpenMPDeclareReductionType(), clang::SemaOpenMP::ActOnOpenMPDeclareSimdDirective(), clang::Sema::ActOnPackExpansion(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTemplateIdType(), clang::Sema::ActOnTemplateName(), clang::Sema::ActOnTemplateTypeArgument(), clang::Sema::ActOnTypenameType(), clang::Sema::ActOnUndeclaredTypeTemplateName(), clang::Sema::ActOnVarTemplateSpecialization(), clang::Sema::BuildMemInitializer(), clang::Sema::BuildTypeConstraint(), clang::SemaOpenMP::checkOpenMPDeclareVariantFunction(), clang::Sema::CheckTypeConstraint(), clang::SemaCodeCompletion::CodeCompleteObjCForCollection(), clang::Sema::containsUnexpandedParameterPacks(), clang::Sema::DiagnoseUnknownTypeName(), findOMPAllocatorHandleT(), findOMPAlloctraitT(), findOMPDependT(), findOMPEventHandleT(), getLambdaType(), clang::OpaquePtr< PtrTy >::getPtrAs(), clang::OpaquePtr< PtrTy >::getPtrTo(), clang::Sema::GetTypeFromParser(), clang::Sema::getTypeName(), InventTemplateParameter(), clang::Declarator::isDeclarationOfFunction(), clang::Sema::isTemplateName(), clang::ParseAST(), clang::Sema::ParsedFreeStandingDeclSpec(), ProcessAPINotes(), clang::SemaCodeCompletion::ProduceTemplateArgumentSignatureHelp(), clang::TreeTransform< Derived >::RebuildTemplateName(), clang::DeclSpec::SetTypeSpecType(), translateTemplateArgument(), clang::Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec(), and validateDeclsInsideHLSLBuffer().
|
inline |
Definition at line 90 of file Ownership.h.
Referenced by clang::Sema::ActOnAlignasTypeArgument(), clang::Sema::BuildCXXForRangeStmt(), clang::SemaCodeCompletion::CodeCompleteObjCForCollection(), findOMPAllocatorHandleT(), findOMPAlloctraitT(), findOMPDependT(), findOMPEventHandleT(), and handleAlignedAttr().
|
inlinestatic |
Definition at line 91 of file Ownership.h.
References P.
Referenced by clang::UnionOpaquePtr< T >::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 76 of file Ownership.h.
References clang::OpaquePtr< PtrTy >::get().
|
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 66 of file Ownership.h.
References clang::OpaquePtr< PtrTy >::get().
|
inlinestatic |
Definition at line 60 of file Ownership.h.
References P, and clang::OpaquePtr< PtrTy >::set().
Referenced by clang::SemaOpenMP::ActOnOpenMPAllocateDirective(), clang::SemaOpenMP::ActOnOpenMPDeclareMapperDirective(), clang::SemaOpenMP::ActOnOpenMPDeclareReductionDirectiveStart(), clang::SemaOpenMP::ActOnOpenMPRequiresDirective(), clang::SemaOpenMP::ActOnOpenMPThreadprivateDirective(), clang::Sema::BuildDeclaratorGroup(), clang::Sema::ConvertDeclToDeclGroup(), and clang::Parser::ParseOpenACCDirectiveDecl().
|
inlineexplicit |
Definition at line 88 of file Ownership.h.
|
inline |
Definition at line 84 of file Ownership.h.
References P.
Referenced by clang::OpaquePtr< PtrTy >::make().