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:
- public Defined
- public Elif
- public Elifdef
- public Elifdef
- public Elifndef
- public Elifndef
- public Else
- public EndOfMainFile
- public Endif
- public EnteredSubmodule
- public FileChanged
- public FileSkipped
- public HasInclude
- public Ident
- public If
- public Ifdef
- public Ifndef
- public InclusionDirective
- public LeftSubmodule
- public LexedFileChanged
- public MacroDefined
- public MacroExpands
- public MacroUndefined
- public PragmaAssumeNonNullBegin
- public PragmaAssumeNonNullEnd
- public PragmaComment
- public PragmaDebug
- public PragmaDetectMismatch
- public PragmaDiagnostic
- public PragmaDiagnosticPop
- public PragmaDiagnosticPush
- public PragmaDirective
- public PragmaExecCharsetPop
- public PragmaExecCharsetPush
- public PragmaMark
- public PragmaMessage
- public PragmaOpenCLExtension
- public PragmaWarning
- public PragmaWarningPop
- public PragmaWarningPush
- public SourceRangeSkipped
- public moduleImport
Methods
¶void FileChanged(
clang::SourceLocation Loc,
clang::PPCallbacks::FileChangeReason Reason,
SrcMgr::CharacteristicKind FileType,
clang::FileID PrevFID)
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()
void reset()
Declared at: clang/lib/Sema/Sema.cpp:139
¶void set(clang::Sema& S)
void set(clang::Sema& S)
Declared at: clang/lib/Sema/Sema.cpp:137
Parameters
- clang::Sema& S