clang-tools 10.0.0

Public Member Functions | List of all members
clang::clangd::CollectMainFileMacros Class Reference

Collects macro references (e.g. More...

`#include <CollectMacros.h>`

Inheritance diagram for clang::clangd::CollectMainFileMacros:
[legend]
Collaboration diagram for clang::clangd::CollectMainFileMacros:
[legend]

## Public Member Functions
| CollectMainFileMacros (const SourceManager &SM, const LangOptions &LangOpts, MainFileMacros &Out)
void | FileChanged (SourceLocation Loc, FileChangeReason, SrcMgr::CharacteristicKind, FileID) override
void | MacroDefined (const Token &MacroName, const MacroDirective *MD) override
void | MacroExpands (const Token &MacroName, const MacroDefinition &MD, SourceRange Range, const MacroArgs *Args) override
void | MacroUndefined (const clang::Token &MacroName, const clang::MacroDefinition &MD, const clang::MacroDirective *Undef) override
void | Ifdef (SourceLocation Loc, const Token &MacroName, const MacroDefinition &MD) override
void | Ifndef (SourceLocation Loc, const Token &MacroName, const MacroDefinition &MD) override
void | Defined (const Token &MacroName, const MacroDefinition &MD, SourceRange Range) override
void | SourceRangeSkipped (SourceRange R, SourceLocation EndifLoc) override

## Detailed Description

Collects macro references (e.g.

definitions, expansions) in the main file. It is used to:

- collect macros in the preamble section of the main file (in Preamble.cpp)
- collect macros after the preamble of the main file (in ParsedAST.cpp)

Definition at line 41 of file CollectMacros.h.

## Constructor & Destructor Documentation

## ◆ CollectMainFileMacros()

clang::clangd::CollectMainFileMacros::CollectMainFileMacros | ( | const SourceManager & | SM,
|  | const LangOptions & | LangOpts,
|  | MainFileMacros & | Out
| ) |  |
| inline explicit

Definition at line 43 of file CollectMacros.h.

## Member Function Documentation

## ◆ Defined()

void clang::clangd::CollectMainFileMacros::Defined | ( | const Token & | MacroName,
|  | const MacroDefinition & | MD,
|  | SourceRange | Range
| ) |  |
| inline override

Definition at line 78 of file CollectMacros.h.

## ◆ FileChanged()

void clang::clangd::CollectMainFileMacros::FileChanged | ( | SourceLocation | Loc,
|  | FileChangeReason | ,
|  | SrcMgr::CharacteristicKind | ,
|  | FileID |
| ) |  |
| inline override

Definition at line 48 of file CollectMacros.h.

References clang::clangd::isInsideMainFile().

## ◆ Ifdef()

void clang::clangd::CollectMainFileMacros::Ifdef | ( | SourceLocation | Loc,
|  | const Token & | MacroName,
|  | const MacroDefinition & | MD
| ) |  |
| inline override

Definition at line 68 of file CollectMacros.h.

## ◆ Ifndef()

void clang::clangd::CollectMainFileMacros::Ifndef | ( | SourceLocation | Loc,
|  | const Token & | MacroName,
|  | const MacroDefinition & | MD
| ) |  |
| inline override

Definition at line 73 of file CollectMacros.h.

## ◆ MacroDefined()

void clang::clangd::CollectMainFileMacros::MacroDefined | ( | const Token & | MacroName,
|  | const MacroDirective * | MD
| ) |  |
| inline override

Definition at line 53 of file CollectMacros.h.

## ◆ MacroExpands()

void clang::clangd::CollectMainFileMacros::MacroExpands | ( | const Token & | MacroName,
|  | const MacroDefinition & | MD,
|  | SourceRange | Range,
|  | const MacroArgs * | Args
| ) |  |
| inline override

Definition at line 57 of file CollectMacros.h.

## ◆ MacroUndefined()

void clang::clangd::CollectMainFileMacros::MacroUndefined | ( | const clang::Token & | MacroName,
|  | const clang::MacroDefinition & | MD,
|  | const clang::MacroDirective * | Undef
| ) |  |
| inline override

Definition at line 62 of file CollectMacros.h.

## ◆ SourceRangeSkipped()

void clang::clangd::CollectMainFileMacros::SourceRangeSkipped | ( | SourceRange | R,
|  | SourceLocation | EndifLoc
| ) |  |
| inline override

Definition at line 83 of file CollectMacros.h.

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

- CollectMacros.h