class MacroExpansion

Declaration

class MacroExpansion : public PreprocessedEntity { /* full declaration omitted */ };

Description

Records the location of a macro expansion.

Declared at: clang/include/clang/Lex/PreprocessingRecord.h:169

Inherits from: PreprocessedEntity

Member Variables

private llvm::PointerUnion<IdentifierInfo*, MacroDefinitionRecord*> NameOrDef
The definition of this macro or the name of the macro if it is a builtin macro.

Method Overview

  • public MacroExpansion(clang::IdentifierInfo * BuiltinName, clang::SourceRange Range)
  • public MacroExpansion(clang::MacroDefinitionRecord * Definition, clang::SourceRange Range)
  • public static bool classof(const clang::PreprocessedEntity * PE)
  • public clang::MacroDefinitionRecord * getDefinition() const
  • public const clang::IdentifierInfo * getName() const
  • public bool isBuiltinMacro() const

Inherited from PreprocessedEntity:

Methods

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

Declared at: clang/include/clang/Lex/PreprocessingRecord.h:175

Parameters

clang::IdentifierInfo* BuiltinName
clang::SourceRange Range

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

Declared at: clang/include/clang/Lex/PreprocessingRecord.h:179

Parameters

clang::MacroDefinitionRecord* Definition
clang::SourceRange Range

static bool classof(
    const clang::PreprocessedEntity* PE)

Declared at: clang/include/clang/Lex/PreprocessingRecord.h:200

Parameters

const clang::PreprocessedEntity* PE

clang::MacroDefinitionRecord* getDefinition()
    const

Description

The definition of the macro being expanded. May return null if this is a builtin macro.

Declared at: clang/include/clang/Lex/PreprocessingRecord.h:195

const clang::IdentifierInfo* getName() const

Description

The name of the macro being expanded.

Declared at: clang/include/clang/Lex/PreprocessingRecord.h:187

bool isBuiltinMacro() const

Description

True if it is a builtin macro.

Declared at: clang/include/clang/Lex/PreprocessingRecord.h:184