clang API Documentation

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends
clang::PreprocessedEntity Class Reference

Base class that describes a preprocessed entity, which may be a preprocessor directive or macro expansion. More...

#include <PreprocessingRecord.h>

Inheritance diagram for clang::PreprocessedEntity:
Inheritance graph
[legend]

List of all members.

Public Types

enum  EntityKind {
  InvalidKind, MacroExpansionKind, MacroDefinitionKind, InclusionDirectiveKind,
  FirstPreprocessingDirective = MacroDefinitionKind, LastPreprocessingDirective = InclusionDirectiveKind
}
 The kind of preprocessed entity an object describes. More...

Public Member Functions

EntityKind getKind () const
 Retrieve the kind of preprocessed entity stored in this object.
SourceRange getSourceRange () const LLVM_READONLY
 Retrieve the source range that covers this entire preprocessed entity.
bool isInvalid () const
 Returns true if there was a problem loading the preprocessed entity.
void * operator new (size_t bytes, PreprocessingRecord &PR, unsigned alignment=8) throw ()
void * operator new (size_t bytes, void *mem) throw ()
void operator delete (void *ptr, PreprocessingRecord &PR, unsigned alignment) throw ()
void operator delete (void *, std::size_t) throw ()
void operator delete (void *, void *) throw ()

Static Public Member Functions

static bool classof (const PreprocessedEntity *)

Protected Member Functions

 PreprocessedEntity (EntityKind Kind, SourceRange Range)

Friends

class PreprocessingRecord

Detailed Description

Base class that describes a preprocessed entity, which may be a preprocessor directive or macro expansion.

Definition at line 46 of file PreprocessingRecord.h.


Member Enumeration Documentation

The kind of preprocessed entity an object describes.

Enumerator:
InvalidKind 

Indicates a problem trying to load the preprocessed entity.

MacroExpansionKind 

A macro expansion.

MacroDefinitionKind 

A macro definition.

InclusionDirectiveKind 

An inclusion directive, such as #include, #import, or #include_next.

FirstPreprocessingDirective 
LastPreprocessingDirective 

Definition at line 49 of file PreprocessingRecord.h.


Constructor & Destructor Documentation

clang::PreprocessedEntity::PreprocessedEntity ( EntityKind  Kind,
SourceRange  Range 
) [inline, protected]

Definition at line 80 of file PreprocessingRecord.h.


Member Function Documentation

static bool clang::PreprocessedEntity::classof ( const PreprocessedEntity ) [inline, static]
EntityKind clang::PreprocessedEntity::getKind ( ) const [inline]

Retrieve the kind of preprocessed entity stored in this object.

Reimplemented in clang::InclusionDirective.

Definition at line 87 of file PreprocessingRecord.h.

Referenced by clang::PreprocessingDirective::classof(), clang::MacroDefinition::classof(), clang::MacroExpansion::classof(), and clang::InclusionDirective::classof().

SourceRange clang::PreprocessedEntity::getSourceRange ( ) const [inline]

Retrieve the source range that covers this entire preprocessed entity.

Definition at line 91 of file PreprocessingRecord.h.

Referenced by clang::PreprocessingRecord::addPreprocessedEntity(), and isPreprocessedEntityIfInFileID().

bool clang::PreprocessedEntity::isInvalid ( ) const [inline]

Returns true if there was a problem loading the preprocessed entity.

Definition at line 95 of file PreprocessingRecord.h.

Referenced by clang::PreprocessingRecord::findMacroDefinition().

void clang::PreprocessedEntity::operator delete ( void *  ptr,
PreprocessingRecord PR,
unsigned  alignment 
) throw () [inline]

Definition at line 111 of file PreprocessingRecord.h.

References operator delete().

void clang::PreprocessedEntity::operator delete ( void *  ,
std::size_t   
) throw () [inline]

Definition at line 116 of file PreprocessingRecord.h.

void clang::PreprocessedEntity::operator delete ( void *  ,
void *   
) throw () [inline]

Definition at line 117 of file PreprocessingRecord.h.

void* clang::PreprocessedEntity::operator new ( size_t  bytes,
PreprocessingRecord PR,
unsigned  alignment = 8 
) throw () [inline]

Definition at line 102 of file PreprocessingRecord.h.

References operator new().

void* clang::PreprocessedEntity::operator new ( size_t  bytes,
void *  mem 
) throw () [inline]

Definition at line 107 of file PreprocessingRecord.h.


Friends And Related Function Documentation

friend class PreprocessingRecord [friend]

Definition at line 83 of file PreprocessingRecord.h.


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