class SemaPPCallbacks

Declaration

class SemaPPCallbacks : 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/Sema/Sema.cpp:132

Inherits from: PPCallbacks

Member Variables

private clang::Sema* S = nullptr
private llvm::SmallVector<SourceLocation, 8> IncludeStack

Method Overview

  • public void FileChanged(clang::SourceLocation Loc, clang::PPCallbacks::FileChangeReason Reason, SrcMgr::CharacteristicKind FileType, clang::FileID PrevFID)
  • public void reset()
  • public void set(clang::Sema & S)

Inherited from PPCallbacks:

Methods

void FileChanged(
    clang::SourceLocation Loc,
    clang::PPCallbacks::FileChangeReason Reason,
    SrcMgr::CharacteristicKind FileType,
    clang::FileID PrevFID)

Description

Callback invoked whenever a source file is entered or exited.

Declared at: clang/lib/Sema/Sema.cpp:141

Parameters

clang::SourceLocation Loc
Indicates the new location.
clang::PPCallbacks::FileChangeReason Reason
SrcMgr::CharacteristicKind FileType
clang::FileID PrevFID
the file that was exited if \p Reason is ExitFile or the the file before the new one entered for \p Reason EnterFile.

void reset()

Declared at: clang/lib/Sema/Sema.cpp:139

void set(clang::Sema& S)

Declared at: clang/lib/Sema/Sema.cpp:137

Parameters

clang::Sema& S