class MacroDefinition

Declaration

class MacroDefinition { /* full declaration omitted */ };

Description

A description of the current definition of a macro. The definition of a macro comprises a set of (at least one) defining entities, which are either local MacroDirectives or imported ModuleMacros.

Declared at: clang/include/clang/Lex/MacroInfo.h:588

Member Variables

private llvm::PointerIntPair<DefMacroDirective*, 1, bool> LatestLocalAndAmbiguous
private ArrayRef<clang::ModuleMacro*> ModuleMacros

Method Overview

Methods

MacroDefinition()

Declared at: clang/include/clang/Lex/MacroInfo.h:593

MacroDefinition(clang::DefMacroDirective* MD,
                ArrayRef<clang::ModuleMacro*> MMs,
                bool IsAmbiguous)

Declared at: clang/include/clang/Lex/MacroInfo.h:594

Parameters

clang::DefMacroDirective* MD
ArrayRef<clang::ModuleMacro*> MMs
bool IsAmbiguous

template <typename Fn>
void forAllDefinitions(Fn F) const

Declared at: clang/include/clang/Lex/MacroInfo.h:624

Templates

Fn

Parameters

Fn F

clang::DefMacroDirective* getLocalDirective()
    const

Description

Get the latest non-imported, non- # undef'd macro definition for this macro.

Declared at: clang/include/clang/Lex/MacroInfo.h:617

clang::MacroInfo* getMacroInfo() const

Description

Get the MacroInfo that should be used for this definition.

Declared at: clang/include/clang/Lex/MacroInfo.h:604

ArrayRef<clang::ModuleMacro*> getModuleMacros()
    const

Description

Get the active module macros for this macro.

Declared at: clang/include/clang/Lex/MacroInfo.h:622

bool isAmbiguous() const

Description

\c true if the definition is ambiguous, \c false otherwise.

Declared at: clang/include/clang/Lex/MacroInfo.h:613

bool operator bool() const

Description

Determine whether there is a definition of this macro.

Declared at: clang/include/clang/Lex/MacroInfo.h:599