clang-tools 20.0.0git
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:
Inheritance graph
[legend]

Public Member Functions

 CollectMainFileMacros (const Preprocessor &PP, 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 Elifdef (SourceLocation Loc, const Token &MacroNameTok, const MacroDefinition &MD) override
 
void Elifndef (SourceLocation Loc, const Token &MacroNameTok, const MacroDefinition &MD) override
 
void Defined (const Token &MacroName, const MacroDefinition &MD, SourceRange Range) override
 
void SourceRangeSkipped (SourceRange R, SourceLocation EndifLoc) override
 
void doneParse ()
 

Detailed Description

Collects macro references (e.g.

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

Definition at line 52 of file CollectMacros.h.

Constructor & Destructor Documentation

◆ CollectMainFileMacros()

clang::clangd::CollectMainFileMacros::CollectMainFileMacros ( const Preprocessor &  PP,
MainFileMacros Out 
)
inlineexplicit

Definition at line 54 of file CollectMacros.h.

References Out.

Member Function Documentation

◆ Defined()

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

Definition at line 88 of file CollectMacros.cpp.

References MacroName.

◆ doneParse()

void clang::clangd::CollectMainFileMacros::doneParse ( )
inline

Definition at line 91 of file CollectMacros.h.

◆ Elifdef()

void clang::clangd::CollectMainFileMacros::Elifdef ( SourceLocation  Loc,
const Token MacroNameTok,
const MacroDefinition &  MD 
)
override

Definition at line 76 of file CollectMacros.cpp.

References MacroName.

◆ Elifndef()

void clang::clangd::CollectMainFileMacros::Elifndef ( SourceLocation  Loc,
const Token MacroNameTok,
const MacroDefinition &  MD 
)
override

Definition at line 82 of file CollectMacros.cpp.

References MacroName.

◆ FileChanged()

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

Definition at line 46 of file CollectMacros.cpp.

References clang::clangd::isInsideMainFile(), and Loc.

◆ Ifdef()

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

Definition at line 64 of file CollectMacros.cpp.

References MacroName.

◆ Ifndef()

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

Definition at line 70 of file CollectMacros.cpp.

References MacroName.

◆ MacroDefined()

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

Definition at line 131 of file CollectMacros.cpp.

References MacroName.

◆ MacroExpands()

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

Definition at line 51 of file CollectMacros.cpp.

References MacroName.

◆ MacroUndefined()

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

Definition at line 58 of file CollectMacros.cpp.

References MacroName.

◆ SourceRangeSkipped()

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

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