clang  6.0.0svn
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
clang::PreprocessedEntity Class Reference

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

#include "clang/Lex/PreprocessingRecord.h"

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

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. More...
 
SourceRange getSourceRange () const LLVM_READONLY
 Retrieve the source range that covers this entire preprocessed entity. More...
 
bool isInvalid () const
 Returns true if there was a problem loading the preprocessed entity. More...
 
void * operator new (size_t bytes, PreprocessingRecord &PR, unsigned alignment=8) noexcept
 
void * operator new (size_t bytes, void *mem) noexcept
 
void operator delete (void *ptr, PreprocessingRecord &PR, unsigned alignment) noexcept
 
void operator delete (void *, std::size_t) noexcept
 
void operator delete (void *, void *) noexcept
 

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 47 of file PreprocessingRecord.h.

Member Enumeration Documentation

◆ EntityKind

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 50 of file PreprocessingRecord.h.

Constructor & Destructor Documentation

◆ PreprocessedEntity()

clang::PreprocessedEntity::PreprocessedEntity ( EntityKind  Kind,
SourceRange  Range 
)
inlineprotected

Definition at line 81 of file PreprocessingRecord.h.

Member Function Documentation

◆ getKind()

EntityKind clang::PreprocessedEntity::getKind ( ) const
inline

Retrieve the kind of preprocessed entity stored in this object.

Definition at line 88 of file PreprocessingRecord.h.

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

◆ getSourceRange()

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

◆ isInvalid()

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

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

Definition at line 96 of file PreprocessingRecord.h.

References InvalidKind.

◆ operator delete() [1/3]

void clang::PreprocessedEntity::operator delete ( void *  ptr,
PreprocessingRecord PR,
unsigned  alignment 
)
inlinenoexcept

Definition at line 107 of file PreprocessingRecord.h.

◆ operator delete() [2/3]

void clang::PreprocessedEntity::operator delete ( void *  ,
std::size_t   
)
inlinenoexcept

Definition at line 112 of file PreprocessingRecord.h.

◆ operator delete() [3/3]

void clang::PreprocessedEntity::operator delete ( void *  ,
void *   
)
inlinenoexcept

Definition at line 113 of file PreprocessingRecord.h.

References bytes().

◆ operator new() [1/2]

void* clang::PreprocessedEntity::operator new ( size_t  bytes,
PreprocessingRecord PR,
unsigned  alignment = 8 
)
inlinenoexcept

Definition at line 100 of file PreprocessingRecord.h.

References bytes().

◆ operator new() [2/2]

void* clang::PreprocessedEntity::operator new ( size_t  bytes,
void *  mem 
)
inlinenoexcept

Definition at line 105 of file PreprocessingRecord.h.

Friends And Related Function Documentation

◆ PreprocessingRecord

friend class PreprocessingRecord
friend

Definition at line 84 of file PreprocessingRecord.h.


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