clang 10.0.0git

Public Member Functions | Static Public Member Functions | List of all members
clang::DefMacroDirective Class Reference

A directive for a defined macro or a macro imported from a module. More...

`#include "clang/Lex/MacroInfo.h"`

Inheritance diagram for clang::DefMacroDirective:
[legend]
Collaboration diagram for clang::DefMacroDirective:
[legend]

## Public Member Functions
| DefMacroDirective (MacroInfo *MI, SourceLocation Loc)
| DefMacroDirective (MacroInfo *MI)
const MacroInfo * | getInfo () const
| The data for the macro definition. More...
MacroInfo * | getInfo ()
Public Member Functions inherited from clang::MacroDirective
Kind | getKind () const
SourceLocation | getLocation () const
void | setPrevious (MacroDirective *Prev)
| Set previous definition of the macro with the same name. More...
const MacroDirective * | getPrevious () const
| Get previous definition of the macro with the same name. More...
MacroDirective * | getPrevious ()
| Get previous definition of the macro with the same name. More...
bool | isFromPCH () const
| Return true if the macro directive was loaded from a PCH file. More...
void | setIsFromPCH ()
DefInfo | getDefinition ()
| Traverses the macro directives history and returns the next macro definition directive along with info about its undefined location (if there is one) and if it is public or private. More...
const DefInfo | getDefinition () const
bool | isDefined () const
const MacroInfo * | getMacroInfo () const
MacroInfo * | getMacroInfo ()
const DefInfo | findDirectiveAtLoc (SourceLocation L, const SourceManager &SM) const
| Find macro definition active in the specified source location. More...
void | dump () const

## Static Public Member Functions
static bool | classof (const MacroDirective *MD)
static bool | classof (const DefMacroDirective *)
Static Public Member Functions inherited from clang::MacroDirective
static bool | classof (const MacroDirective *)

## Additional Inherited Members
Public Types inherited from clang::MacroDirective
enum | Kind { MD_Define, MD_Undefine, MD_Visibility }
Protected Member Functions inherited from clang::MacroDirective
| MacroDirective (Kind K, SourceLocation Loc)
Protected Attributes inherited from clang::MacroDirective
MacroDirective * | Previous = nullptr
| Previous macro directive for the same identifier, or nullptr. More...
SourceLocation | Loc
unsigned | MDKind: 2
| MacroDirective kind. More...
unsigned | IsFromPCH: 1
| True if the macro directive was loaded from a PCH file. More...
unsigned | IsPublic: 1
| Whether the macro has public visibility (when described in a module). More...

## Detailed Description

A directive for a defined macro or a macro imported from a module.

Definition at line 406 of file MacroInfo.h.

## Constructor & Destructor Documentation

## ◆ DefMacroDirective() [1/2]

clang::DefMacroDirective::DefMacroDirective | ( | MacroInfo * | MI,
|  | SourceLocation | Loc
| ) |  |
| inline

Definition at line 410 of file MacroInfo.h.

## ◆ DefMacroDirective() [2/2]

clang::DefMacroDirective::DefMacroDirective | ( | MacroInfo * | MI | ) |
| inline explicit

Definition at line 414 of file MacroInfo.h.

## Member Function Documentation

## ◆ classof() [1/2]

static bool clang::DefMacroDirective::classof | ( | const MacroDirective * | MD | ) |
| inline static

Definition at line 421 of file MacroInfo.h.

References clang::MacroDirective::getKind().

## ◆ classof() [2/2]

static bool clang::DefMacroDirective::classof | ( | const DefMacroDirective * |  | ) |
| inline static

Definition at line 425 of file MacroInfo.h.

## ◆ getInfo() [1/2]

const MacroInfo* clang::DefMacroDirective::getInfo | ( |  | ) | const
| inline

The data for the macro definition.

Definition at line 418 of file MacroInfo.h.

## ◆ getInfo() [2/2]

MacroInfo* clang::DefMacroDirective::getInfo | ( |  | ) |
| inline

Definition at line 419 of file MacroInfo.h.

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

- include/clang/Lex/MacroInfo.h