clang 22.0.0git
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:
[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.
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) 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 58 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 61 of file PreprocessingRecord.h.

Constructor & Destructor Documentation

◆ PreprocessedEntity()

Member Function Documentation

◆ getKind()

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

Retrieve the kind of preprocessed entity stored in this object.

Definition at line 99 of file PreprocessingRecord.h.

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

◆ getSourceRange()

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

Retrieve the source range that covers this entire preprocessed entity.

Definition at line 103 of file PreprocessingRecord.h.

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

◆ isInvalid()

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

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

Definition at line 107 of file PreprocessingRecord.h.

References InvalidKind.

◆ operator delete() [1/3]

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

Definition at line 123 of file PreprocessingRecord.h.

◆ operator delete() [2/3]

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

Definition at line 124 of file PreprocessingRecord.h.

◆ operator delete() [3/3]

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

Definition at line 118 of file PreprocessingRecord.h.

References PreprocessingRecord.

◆ operator new() [1/2]

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

Definition at line 111 of file PreprocessingRecord.h.

References bytes(), and PreprocessingRecord.

◆ operator new() [2/2]

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

Definition at line 116 of file PreprocessingRecord.h.

References bytes().

◆ PreprocessingRecord

friend class PreprocessingRecord
friend

Definition at line 92 of file PreprocessingRecord.h.

References PreprocessingRecord.

Referenced by operator delete(), operator new(), and PreprocessingRecord.


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