clang 20.0.0git
Public Member Functions | Static Public Member Functions | List of all members
clang::MacroDefinitionRecord Class Reference

Record the location of a macro definition. More...

#include "clang/Lex/PreprocessingRecord.h"

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

Public Member Functions

 MacroDefinitionRecord (const IdentifierInfo *Name, SourceRange Range)
 
const IdentifierInfogetName () const
 Retrieve the name of the macro being defined.
 
SourceLocation getLocation () const
 Retrieve the location of the macro name in the definition.
 
- Public Member Functions inherited from clang::PreprocessingDirective
 PreprocessingDirective (EntityKind Kind, SourceRange Range)
 
- Public Member Functions inherited from clang::PreprocessedEntity
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
 

Static Public Member Functions

static bool classof (const PreprocessedEntity *PE)
 
- Static Public Member Functions inherited from clang::PreprocessingDirective
static bool classof (const PreprocessedEntity *PD)
 

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

Record the location of a macro definition.

Definition at line 146 of file PreprocessingRecord.h.

Constructor & Destructor Documentation

◆ MacroDefinitionRecord()

clang::MacroDefinitionRecord::MacroDefinitionRecord ( const IdentifierInfo Name,
SourceRange  Range 
)
inlineexplicit

Definition at line 151 of file PreprocessingRecord.h.

References Range.

Member Function Documentation

◆ classof()

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

◆ getLocation()

SourceLocation clang::MacroDefinitionRecord::getLocation ( ) const
inline

Retrieve the location of the macro name in the definition.

Definition at line 159 of file PreprocessingRecord.h.

References clang::SourceRange::getBegin(), and clang::PreprocessedEntity::getSourceRange().

Referenced by clang::index::generateUSRForMacro().

◆ getName()

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

Retrieve the name of the macro being defined.

Definition at line 156 of file PreprocessingRecord.h.

Referenced by clang::index::generateUSRForMacro().


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