class MacroExpansionRangeRecorder

Declaration

class MacroExpansionRangeRecorder : public PPCallbacks { /* full declaration omitted */ };

Description

This interface provides a way to observe the actions of the preprocessor as it does its thing. Clients can define their hooks here to implement preprocessor level tools.

Declared at: clang/lib/Analysis/MacroExpansionContext.cpp:19

Inherits from: PPCallbacks

Member Variables

private const clang::Preprocessor& PP
private clang::SourceManager& SM
private MacroExpansionContext::ExpansionRangeMap& ExpansionRanges

Method Overview

  • public void MacroExpands(const clang::Token & MacroName, const clang::MacroDefinition & MD, clang::SourceRange Range, const clang::MacroArgs * Args)
  • public MacroExpansionRangeRecorder(const clang::Preprocessor & PP, clang::SourceManager & SM, MacroExpansionContext::ExpansionRangeMap & ExpansionRanges)

Inherited from PPCallbacks:

Methods

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

Description

Called by Preprocessor::HandleMacroExpandedIdentifier when a macro invocation is found.

Declared at: clang/lib/Analysis/MacroExpansionContext.cpp:30

Parameters

const clang::Token& MacroName
const clang::MacroDefinition& MD
clang::SourceRange Range
const clang::MacroArgs* Args

MacroExpansionRangeRecorder(
    const clang::Preprocessor& PP,
    clang::SourceManager& SM,
    MacroExpansionContext::ExpansionRangeMap&
        ExpansionRanges)

Declared at: clang/lib/Analysis/MacroExpansionContext.cpp:25

Parameters

const clang::Preprocessor& PP
clang::SourceManager& SM
MacroExpansionContext::ExpansionRangeMap& ExpansionRanges