clang-tools 8.0.0

Public Member Functions | List of all members
clang::find_all_symbols::FindAllMacros Class Reference

A preprocessor that collects all macro symbols. More...

`#include <FindAllMacros.h>`

Inheritance diagram for clang::find_all_symbols::FindAllMacros:
[legend]
Collaboration diagram for clang::find_all_symbols::FindAllMacros:
[legend]

## Public Member Functions
| FindAllMacros (SymbolReporter *Reporter, SourceManager *SM, HeaderMapCollector *Collector=nullptr)
void | MacroDefined (const Token &MacroNameTok, const MacroDirective *MD) override
void | MacroExpands (const Token &MacroNameTok, const MacroDefinition &MD, SourceRange Range, const MacroArgs *Args) override
void | Ifdef (SourceLocation Loc, const Token &MacroNameTok, const MacroDefinition &MD) override
void | Ifndef (SourceLocation Loc, const Token &MacroNameTok, const MacroDefinition &MD) override
void | EndOfMainFile () override

## Detailed Description

A preprocessor that collects all macro symbols.

The contexts of a macro will be ignored since they are not available during preprocessing period.

Definition at line 27 of file FindAllMacros.h.

## Constructor & Destructor Documentation

## ◆ FindAllMacros()

clang::find_all_symbols::FindAllMacros::FindAllMacros | ( | SymbolReporter * | Reporter,
|  | SourceManager * | SM,
|  | HeaderMapCollector * | Collector = `nullptr`
| ) |  |
| inline explicit

Definition at line 29 of file FindAllMacros.h.

References MacroDefined(), MacroExpands(), clang::doc::MD(), and Range.

## Member Function Documentation

## ◆ EndOfMainFile()

void clang::find_all_symbols::FindAllMacros::EndOfMainFile | ( |  | ) |
| override

Definition at line 63 of file FindAllMacros.cpp.

References clang::find_all_symbols::SymbolReporter::reportSymbols().

## ◆ Ifdef()

void clang::find_all_symbols::FindAllMacros::Ifdef | ( | SourceLocation | Loc,
|  | const Token & | MacroNameTok,
|  | const MacroDefinition & | MD
| ) |  |
| override

Definition at line 53 of file FindAllMacros.cpp.

## ◆ Ifndef()

void clang::find_all_symbols::FindAllMacros::Ifndef | ( | SourceLocation | Loc,
|  | const Token & | MacroNameTok,
|  | const MacroDefinition & | MD
| ) |  |
| override

Definition at line 58 of file FindAllMacros.cpp.

## ◆ MacroDefined()

void clang::find_all_symbols::FindAllMacros::MacroDefined | ( | const Token & | MacroNameTok,
|  | const MacroDirective * | MD
| ) |  |
| override

Definition at line 34 of file FindAllMacros.cpp.

References clang::doc::MD(), and Name.

Referenced by FindAllMacros().

## ◆ MacroExpands()

void clang::find_all_symbols::FindAllMacros::MacroExpands | ( | const Token & | MacroNameTok,
|  | const MacroDefinition & | MD,
|  | SourceRange | Range,
|  | const MacroArgs * | Args
| ) |  |
| override

Definition at line 47 of file FindAllMacros.cpp.

Referenced by FindAllMacros().

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

- FindAllMacros.h
- FindAllMacros.cpp