clang  6.0.0svn
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]
Collaboration diagram for clang::MacroDefinitionRecord:
Collaboration graph
[legend]

Public Member Functions

 MacroDefinitionRecord (const IdentifierInfo *Name, SourceRange Range)
 
const IdentifierInfogetName () const
 Retrieve the name of the macro being defined. More...
 
SourceLocation getLocation () const
 Retrieve the location of the macro name in the definition. More...
 
- 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. 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)
 
- 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 148 of file PreprocessingRecord.h.

Constructor & Destructor Documentation

◆ MacroDefinitionRecord()

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

Definition at line 153 of file PreprocessingRecord.h.

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

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


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