clang API Documentation

Public Types | Public Member Functions | Public Attributes
clang::StoredDeclsList Struct Reference

#include <DeclContextInternals.h>

Collaboration diagram for clang::StoredDeclsList:
Collaboration graph
[legend]

List of all members.

Public Types

typedef SmallVector< NamedDecl *, 4 > DeclsTy
 DeclsTy - When in vector form, this is what the Data pointer points to.

Public Member Functions

 StoredDeclsList ()
 StoredDeclsList (const StoredDeclsList &RHS)
 ~StoredDeclsList ()
StoredDeclsListoperator= (const StoredDeclsList &RHS)
bool isNull () const
NamedDeclgetAsDecl () const
DeclsTygetAsVector () const
void setOnlyValue (NamedDecl *ND)
void remove (NamedDecl *D)
DeclContext::lookup_result getLookupResult ()
bool HandleRedeclaration (NamedDecl *D)
void AddSubsequentDecl (NamedDecl *D)

Public Attributes

llvm::PointerUnion< NamedDecl
*, DeclsTy * > 
Data
 The stored data, which will be either a pointer to a NamedDecl, or a pointer to a vector.

Detailed Description

StoredDeclsList - This is an array of decls optimized a common case of only containing one entry.

Definition at line 31 of file DeclContextInternals.h.


Member Typedef Documentation

typedef SmallVector<NamedDecl *, 4> clang::StoredDeclsList::DeclsTy

DeclsTy - When in vector form, this is what the Data pointer points to.

Definition at line 34 of file DeclContextInternals.h.


Constructor & Destructor Documentation

clang::StoredDeclsList::StoredDeclsList ( ) [inline]

Definition at line 41 of file DeclContextInternals.h.

clang::StoredDeclsList::StoredDeclsList ( const StoredDeclsList RHS) [inline]

Definition at line 43 of file DeclContextInternals.h.

References Data, and getAsVector().

clang::StoredDeclsList::~StoredDeclsList ( ) [inline]

Definition at line 48 of file DeclContextInternals.h.

References getAsVector().


Member Function Documentation

void clang::StoredDeclsList::AddSubsequentDecl ( NamedDecl D) [inline]

AddSubsequentDecl - This is called on the second and later decl when it is not a redeclaration to merge it into the appropriate place in our list.

Definition at line 151 of file DeclContextInternals.h.

References Data, getAsDecl(), getAsVector(), clang::Decl::getIdentifierNamespace(), clang::Decl::hasTagIdentifierNamespace(), and clang::Decl::IDNS_Using.

Referenced by clang::ExternalASTSource::SetExternalVisibleDeclsForName().

NamedDecl* clang::StoredDeclsList::getAsDecl ( ) const [inline]

Definition at line 65 of file DeclContextInternals.h.

References Data.

Referenced by AddSubsequentDecl(), getLookupResult(), HandleRedeclaration(), and remove().

DeclsTy* clang::StoredDeclsList::getAsVector ( ) const [inline]
DeclContext::lookup_result clang::StoredDeclsList::getLookupResult ( ) [inline]

getLookupResult - Return an array of all the decls that this list represents.

Definition at line 102 of file DeclContextInternals.h.

References Data, getAsDecl(), getAsVector(), and isNull().

Referenced by clang::ExternalASTSource::SetExternalVisibleDeclsForName().

bool clang::StoredDeclsList::HandleRedeclaration ( NamedDecl D) [inline]

HandleRedeclaration - If this is a redeclaration of an existing decl, replace the old one with D and return true. Otherwise return false.

Definition at line 125 of file DeclContextInternals.h.

References clang::NamedDecl::declarationReplaces(), getAsDecl(), getAsVector(), and setOnlyValue().

bool clang::StoredDeclsList::isNull ( ) const [inline]
StoredDeclsList& clang::StoredDeclsList::operator= ( const StoredDeclsList RHS) [inline]

Definition at line 54 of file DeclContextInternals.h.

References Data, and getAsVector().

void clang::StoredDeclsList::remove ( NamedDecl D) [inline]

Definition at line 82 of file DeclContextInternals.h.

References Data, getAsDecl(), getAsVector(), and isNull().

void clang::StoredDeclsList::setOnlyValue ( NamedDecl ND) [inline]

Member Data Documentation

The stored data, which will be either a pointer to a NamedDecl, or a pointer to a vector.

Definition at line 38 of file DeclContextInternals.h.

Referenced by AddSubsequentDecl(), getAsDecl(), getAsVector(), getLookupResult(), isNull(), operator=(), remove(), setOnlyValue(), and StoredDeclsList().


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