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
- public MacroDefinition()
- public MacroDefinition(clang::DefMacroDirective * MD, ArrayRef<clang::ModuleMacro *> MMs, bool IsAmbiguous)
- public template <typename Fn>void forAllDefinitions(Fn F) const
- public clang::DefMacroDirective * getLocalDirective() const
- public clang::MacroInfo * getMacroInfo() const
- public ArrayRef<clang::ModuleMacro *> getModuleMacros() const
- public bool isAmbiguous() const
- public bool operator bool() const
Methods
¶MacroDefinition()
MacroDefinition()
Declared at: clang/include/clang/Lex/MacroInfo.h:593
¶MacroDefinition(clang::DefMacroDirective* MD,
ArrayRef<clang::ModuleMacro*> MMs,
bool IsAmbiguous)
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
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
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
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
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
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
bool operator bool() const
Description
Determine whether there is a definition of this macro.
Declared at: clang/include/clang/Lex/MacroInfo.h:599