clang  6.0.0svn
Public Member Functions | Static Public Member Functions | List of all members
clang::MacroExpansion Class Reference

Records the location of a macro expansion. More...

#include "clang/Lex/PreprocessingRecord.h"

Inheritance diagram for clang::MacroExpansion:
Inheritance graph
[legend]
Collaboration diagram for clang::MacroExpansion:
Collaboration graph
[legend]

Public Member Functions

 MacroExpansion (IdentifierInfo *BuiltinName, SourceRange Range)
 
 MacroExpansion (MacroDefinitionRecord *Definition, SourceRange Range)
 
bool isBuiltinMacro () const
 True if it is a builtin macro. More...
 
const IdentifierInfogetName () const
 The name of the macro being expanded. More...
 
MacroDefinitionRecordgetDefinition () const
 The definition of the macro being expanded. More...
 
- Public Member Functions inherited from clang::PreprocessedEntity
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
 

Static Public Member Functions

static bool classof (const PreprocessedEntity *PE)
 

Additional Inherited Members

- Public Types inherited from clang::PreprocessedEntity
enum  EntityKind {
  InvalidKind, MacroExpansionKind, MacroDefinitionKind, InclusionDirectiveKind,
  FirstPreprocessingDirective = MacroDefinitionKind, LastPreprocessingDirective = InclusionDirectiveKind
}
 The kind of preprocessed entity an object describes. More...
 
- Protected Member Functions inherited from clang::PreprocessedEntity
 PreprocessedEntity (EntityKind Kind, SourceRange Range)
 

Detailed Description

Records the location of a macro expansion.

Definition at line 170 of file PreprocessingRecord.h.

Constructor & Destructor Documentation

◆ MacroExpansion() [1/2]

clang::MacroExpansion::MacroExpansion ( IdentifierInfo BuiltinName,
SourceRange  Range 
)
inline

Definition at line 176 of file PreprocessingRecord.h.

◆ MacroExpansion() [2/2]

clang::MacroExpansion::MacroExpansion ( MacroDefinitionRecord Definition,
SourceRange  Range 
)
inline

Definition at line 180 of file PreprocessingRecord.h.

Member Function Documentation

◆ classof()

static bool clang::MacroExpansion::classof ( const PreprocessedEntity PE)
inlinestatic

◆ getDefinition()

MacroDefinitionRecord* clang::MacroExpansion::getDefinition ( ) const
inline

The definition of the macro being expanded.

May return null if this is a builtin macro.

Definition at line 196 of file PreprocessingRecord.h.

◆ getName()

const IdentifierInfo* clang::MacroExpansion::getName ( ) const
inline

The name of the macro being expanded.

Definition at line 188 of file PreprocessingRecord.h.

References getDefinition(), and clang::IdentifierInfo::getName().

◆ isBuiltinMacro()

bool clang::MacroExpansion::isBuiltinMacro ( ) const
inline

True if it is a builtin macro.

Definition at line 185 of file PreprocessingRecord.h.


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