class PPChainedCallbacks
Declaration
class PPChainedCallbacks : public PPCallbacks { /* full declaration omitted */ };
Description
Simple wrapper class for chaining callbacks.
Declared at: clang/include/clang/Lex/PPCallbacks.h:428
Inherits from: PPCallbacks
Member Variables
- private std::unique_ptr<PPCallbacks> First
- private std::unique_ptr<PPCallbacks> Second
Method Overview
- public void Defined(const clang::Token & MacroNameTok, const clang::MacroDefinition & MD, clang::SourceRange Range)
- public void Elif(clang::SourceLocation Loc, clang::SourceRange ConditionRange, clang::PPCallbacks::ConditionValueKind ConditionValue, clang::SourceLocation IfLoc)
- public void Elifdef(clang::SourceLocation Loc, clang::SourceRange ConditionRange, clang::SourceLocation IfLoc)
- public void Elifdef(clang::SourceLocation Loc, const clang::Token & MacroNameTok, const clang::MacroDefinition & MD)
- public void Elifndef(clang::SourceLocation Loc, const clang::Token & MacroNameTok, const clang::MacroDefinition & MD)
- public void Elifndef(clang::SourceLocation Loc, clang::SourceRange ConditionRange, clang::SourceLocation IfLoc)
- public void Else(clang::SourceLocation Loc, clang::SourceLocation IfLoc)
- public void EndOfMainFile()
- public void Endif(clang::SourceLocation Loc, clang::SourceLocation IfLoc)
- public void EnteredSubmodule(clang::Module * M, clang::SourceLocation ImportLoc, bool ForPragma)
- public void FileChanged(clang::SourceLocation Loc, clang::PPCallbacks::FileChangeReason Reason, SrcMgr::CharacteristicKind FileType, clang::FileID PrevFID)
- public void FileSkipped(const clang::FileEntryRef & SkippedFile, const clang::Token & FilenameTok, SrcMgr::CharacteristicKind FileType)
- public void HasInclude(clang::SourceLocation Loc, llvm::StringRef FileName, bool IsAngled, Optional<clang::FileEntryRef> File, SrcMgr::CharacteristicKind FileType)
- public void Ident(clang::SourceLocation Loc, llvm::StringRef str)
- public void If(clang::SourceLocation Loc, clang::SourceRange ConditionRange, clang::PPCallbacks::ConditionValueKind ConditionValue)
- public void Ifdef(clang::SourceLocation Loc, const clang::Token & MacroNameTok, const clang::MacroDefinition & MD)
- public void Ifndef(clang::SourceLocation Loc, const clang::Token & MacroNameTok, const clang::MacroDefinition & MD)
- public void InclusionDirective(clang::SourceLocation HashLoc, const clang::Token & IncludeTok, llvm::StringRef FileName, bool IsAngled, clang::CharSourceRange FilenameRange, Optional<clang::FileEntryRef> File, llvm::StringRef SearchPath, llvm::StringRef RelativePath, const clang::Module * Imported, SrcMgr::CharacteristicKind FileType)
- public void LeftSubmodule(clang::Module * M, clang::SourceLocation ImportLoc, bool ForPragma)
- public void LexedFileChanged(clang::FileID FID, clang::PPCallbacks::LexedFileChangeReason Reason, SrcMgr::CharacteristicKind FileType, clang::FileID PrevFID, clang::SourceLocation Loc)
- public void MacroDefined(const clang::Token & MacroNameTok, const clang::MacroDirective * MD)
- public void MacroExpands(const clang::Token & MacroNameTok, const clang::MacroDefinition & MD, clang::SourceRange Range, const clang::MacroArgs * Args)
- public void MacroUndefined(const clang::Token & MacroNameTok, const clang::MacroDefinition & MD, const clang::MacroDirective * Undef)
- public PPChainedCallbacks(std::unique_ptr<PPCallbacks> _First, std::unique_ptr<PPCallbacks> _Second)
- public void PragmaAssumeNonNullBegin(clang::SourceLocation Loc)
- public void PragmaAssumeNonNullEnd(clang::SourceLocation Loc)
- public void PragmaComment(clang::SourceLocation Loc, const clang::IdentifierInfo * Kind, llvm::StringRef Str)
- public void PragmaDebug(clang::SourceLocation Loc, llvm::StringRef DebugType)
- public void PragmaDetectMismatch(clang::SourceLocation Loc, llvm::StringRef Name, llvm::StringRef Value)
- public void PragmaDiagnostic(clang::SourceLocation Loc, llvm::StringRef Namespace, diag::Severity mapping, llvm::StringRef Str)
- public void PragmaDiagnosticPop(clang::SourceLocation Loc, llvm::StringRef Namespace)
- public void PragmaDiagnosticPush(clang::SourceLocation Loc, llvm::StringRef Namespace)
- public void PragmaDirective(clang::SourceLocation Loc, clang::PragmaIntroducerKind Introducer)
- public void PragmaExecCharsetPop(clang::SourceLocation Loc)
- public void PragmaExecCharsetPush(clang::SourceLocation Loc, llvm::StringRef Str)
- public void PragmaMark(clang::SourceLocation Loc, llvm::StringRef Trivia)
- public void PragmaMessage(clang::SourceLocation Loc, llvm::StringRef Namespace, clang::PPCallbacks::PragmaMessageKind Kind, llvm::StringRef Str)
- public void PragmaOpenCLExtension(clang::SourceLocation NameLoc, const clang::IdentifierInfo * Name, clang::SourceLocation StateLoc, unsigned int State)
- public void PragmaWarning(clang::SourceLocation Loc, clang::PPCallbacks::PragmaWarningSpecifier WarningSpec, ArrayRef<int> Ids)
- public void PragmaWarningPop(clang::SourceLocation Loc)
- public void PragmaWarningPush(clang::SourceLocation Loc, int Level)
- public void SourceRangeSkipped(clang::SourceRange Range, clang::SourceLocation EndifLoc)
- public void moduleImport(clang::SourceLocation ImportLoc, clang::ModuleIdPath Path, const clang::Module * Imported)
- public ~PPChainedCallbacks()
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 Defined(const clang::Token& MacroNameTok,
const clang::MacroDefinition& MD,
clang::SourceRange Range)
void Defined(const clang::Token& MacroNameTok,
const clang::MacroDefinition& MD,
clang::SourceRange Range)
Description
Hook called whenever the 'defined' operator is seen.
Declared at: clang/include/clang/Lex/PPCallbacks.h:615
Parameters
- const clang::Token& MacroNameTok
- const clang::MacroDefinition& MD
- The MacroDirective if the name was a macro, null otherwise.
- clang::SourceRange Range
¶void Elif(clang::SourceLocation Loc,
clang::SourceRange ConditionRange,
clang::PPCallbacks::ConditionValueKind
ConditionValue,
clang::SourceLocation IfLoc)
void Elif(clang::SourceLocation Loc,
clang::SourceRange ConditionRange,
clang::PPCallbacks::ConditionValueKind
ConditionValue,
clang::SourceLocation IfLoc)
Description
Hook called whenever an # elif is seen.
Declared at: clang/include/clang/Lex/PPCallbacks.h:634
Parameters
- clang::SourceLocation Loc
- clang::SourceRange ConditionRange
- clang::PPCallbacks::ConditionValueKind ConditionValue
- clang::SourceLocation IfLoc
¶void Elifdef(clang::SourceLocation Loc,
clang::SourceRange ConditionRange,
clang::SourceLocation IfLoc)
void Elifdef(clang::SourceLocation Loc,
clang::SourceRange ConditionRange,
clang::SourceLocation IfLoc)
Description
Hook called whenever an # elifdef is skipped.
Declared at: clang/include/clang/Lex/PPCallbacks.h:654
Parameters
- clang::SourceLocation Loc
- clang::SourceRange ConditionRange
- clang::SourceLocation IfLoc
¶void Elifdef(clang::SourceLocation Loc,
const clang::Token& MacroNameTok,
const clang::MacroDefinition& MD)
void Elifdef(clang::SourceLocation Loc,
const clang::Token& MacroNameTok,
const clang::MacroDefinition& MD)
Description
Hook called whenever an # elifdef is taken.
Declared at: clang/include/clang/Lex/PPCallbacks.h:648
Parameters
- clang::SourceLocation Loc
- const clang::Token& MacroNameTok
- const clang::MacroDefinition& MD
¶void Elifndef(clang::SourceLocation Loc,
const clang::Token& MacroNameTok,
const clang::MacroDefinition& MD)
void Elifndef(clang::SourceLocation Loc,
const clang::Token& MacroNameTok,
const clang::MacroDefinition& MD)
Description
Hook called whenever an # elifndef is taken.
Declared at: clang/include/clang/Lex/PPCallbacks.h:668
Parameters
- clang::SourceLocation Loc
- const clang::Token& MacroNameTok
- const clang::MacroDefinition& MD
¶void Elifndef(clang::SourceLocation Loc,
clang::SourceRange ConditionRange,
clang::SourceLocation IfLoc)
void Elifndef(clang::SourceLocation Loc,
clang::SourceRange ConditionRange,
clang::SourceLocation IfLoc)
Description
Hook called whenever an # elifndef is skipped.
Declared at: clang/include/clang/Lex/PPCallbacks.h:674
Parameters
- clang::SourceLocation Loc
- clang::SourceRange ConditionRange
- clang::SourceLocation IfLoc
¶void Else(clang::SourceLocation Loc,
clang::SourceLocation IfLoc)
void Else(clang::SourceLocation Loc,
clang::SourceLocation IfLoc)
Description
Hook called whenever an # else is seen.
Declared at: clang/include/clang/Lex/PPCallbacks.h:681
Parameters
¶void EndOfMainFile()
void EndOfMainFile()
Description
Callback invoked when the end of the main file is reached. No subsequent callbacks will be made.
Declared at: clang/include/clang/Lex/PPCallbacks.h:490
¶void Endif(clang::SourceLocation Loc,
clang::SourceLocation IfLoc)
void Endif(clang::SourceLocation Loc,
clang::SourceLocation IfLoc)
Description
Hook called whenever an # endif is seen.
Declared at: clang/include/clang/Lex/PPCallbacks.h:687
Parameters
¶void EnteredSubmodule(
clang::Module* M,
clang::SourceLocation ImportLoc,
bool ForPragma)
void EnteredSubmodule(
clang::Module* M,
clang::SourceLocation ImportLoc,
bool ForPragma)
Description
Callback invoked whenever a submodule was entered.
Declared at: clang/include/clang/Lex/PPCallbacks.h:472
Parameters
- clang::Module* M
- The submodule we have entered.
- clang::SourceLocation ImportLoc
- The location of import directive token.
- bool ForPragma
- If entering from pragma directive.
¶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/include/clang/Lex/PPCallbacks.h:438
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 FileSkipped(
const clang::FileEntryRef& SkippedFile,
const clang::Token& FilenameTok,
SrcMgr::CharacteristicKind FileType)
void FileSkipped(
const clang::FileEntryRef& SkippedFile,
const clang::Token& FilenameTok,
SrcMgr::CharacteristicKind FileType)
Description
Callback invoked whenever a source file is skipped as the result of header guard optimization.
Declared at: clang/include/clang/Lex/PPCallbacks.h:452
Parameters
- const clang::FileEntryRef& SkippedFile
- The file that is skipped instead of entering # include
- const clang::Token& FilenameTok
- The file name token in # include "FileName" directive or macro expanded file name token from # include MACRO(PARAMS) directive. Note that FilenameTok contains corresponding quotes/angles symbols.
- SrcMgr::CharacteristicKind FileType
¶void HasInclude(
clang::SourceLocation Loc,
llvm::StringRef FileName,
bool IsAngled,
Optional<clang::FileEntryRef> File,
SrcMgr::CharacteristicKind FileType)
void HasInclude(
clang::SourceLocation Loc,
llvm::StringRef FileName,
bool IsAngled,
Optional<clang::FileEntryRef> File,
SrcMgr::CharacteristicKind FileType)
Description
Hook called when a '__has_include' or '__has_include_next' directive is read.
Declared at: clang/include/clang/Lex/PPCallbacks.h:550
Parameters
- clang::SourceLocation Loc
- llvm::StringRef FileName
- bool IsAngled
- Optional<clang::FileEntryRef> File
- SrcMgr::CharacteristicKind FileType
¶void Ident(clang::SourceLocation Loc,
llvm::StringRef str)
void Ident(clang::SourceLocation Loc,
llvm::StringRef str)
Description
Callback invoked when a # ident or # sccs directive is read.
Declared at: clang/include/clang/Lex/PPCallbacks.h:495
Parameters
- clang::SourceLocation Loc
- The location of the directive.
- llvm::StringRef str
- The text of the directive.
¶void If(clang::SourceLocation Loc,
clang::SourceRange ConditionRange,
clang::PPCallbacks::ConditionValueKind
ConditionValue)
void If(clang::SourceLocation Loc,
clang::SourceRange ConditionRange,
clang::PPCallbacks::ConditionValueKind
ConditionValue)
Description
Hook called whenever an # if is seen.
Declared at: clang/include/clang/Lex/PPCallbacks.h:627
Parameters
- clang::SourceLocation Loc
- clang::SourceRange ConditionRange
- clang::PPCallbacks::ConditionValueKind ConditionValue
¶void Ifdef(clang::SourceLocation Loc,
const clang::Token& MacroNameTok,
const clang::MacroDefinition& MD)
void Ifdef(clang::SourceLocation Loc,
const clang::Token& MacroNameTok,
const clang::MacroDefinition& MD)
Description
Hook called whenever an # ifdef is seen.
Declared at: clang/include/clang/Lex/PPCallbacks.h:641
Parameters
- clang::SourceLocation Loc
- const clang::Token& MacroNameTok
- const clang::MacroDefinition& MD
¶void Ifndef(clang::SourceLocation Loc,
const clang::Token& MacroNameTok,
const clang::MacroDefinition& MD)
void Ifndef(clang::SourceLocation Loc,
const clang::Token& MacroNameTok,
const clang::MacroDefinition& MD)
Description
Hook called whenever an # ifndef is seen.
Declared at: clang/include/clang/Lex/PPCallbacks.h:661
Parameters
- clang::SourceLocation Loc
- const clang::Token& MacroNameTok
- const clang::MacroDefinition& MD
¶void InclusionDirective(
clang::SourceLocation HashLoc,
const clang::Token& IncludeTok,
llvm::StringRef FileName,
bool IsAngled,
clang::CharSourceRange FilenameRange,
Optional<clang::FileEntryRef> File,
llvm::StringRef SearchPath,
llvm::StringRef RelativePath,
const clang::Module* Imported,
SrcMgr::CharacteristicKind FileType)
void InclusionDirective(
clang::SourceLocation HashLoc,
const clang::Token& IncludeTok,
llvm::StringRef FileName,
bool IsAngled,
clang::CharSourceRange FilenameRange,
Optional<clang::FileEntryRef> File,
llvm::StringRef SearchPath,
llvm::StringRef RelativePath,
const clang::Module* Imported,
SrcMgr::CharacteristicKind FileType)
Description
Callback invoked whenever an inclusion directive of any kind (\c \#include \c \#import etc.) has been processed, regardless of whether the inclusion will actually result in an inclusion.
Declared at: clang/include/clang/Lex/PPCallbacks.h:458
Parameters
- clang::SourceLocation HashLoc
- The location of the '#' that starts the inclusion directive.
- const clang::Token& IncludeTok
- The token that indicates the kind of inclusion directive, e.g., 'include' or 'import'.
- llvm::StringRef FileName
- The name of the file being included, as written in the source code.
- bool IsAngled
- Whether the file name was enclosed in angle brackets; otherwise, it was enclosed in quotes.
- clang::CharSourceRange FilenameRange
- The character range of the quotes or angle brackets for the written file name.
- Optional<clang::FileEntryRef> File
- The actual file that may be included by this inclusion directive.
- llvm::StringRef SearchPath
- Contains the search path which was used to find the file in the file system. If the file was found via an absolute include path, SearchPath will be empty. For framework includes, the SearchPath and RelativePath will be split up. For example, if an include of "Some/Some.h" is found via the framework path "path/to/Frameworks/Some.framework/Headers/Some.h", SearchPath will be "path/to/Frameworks/Some.framework/Headers" and RelativePath will be "Some.h".
- llvm::StringRef RelativePath
- The path relative to SearchPath, at which the include file was found. This is equal to FileName except for framework includes.
- const clang::Module* Imported
- The module, whenever an inclusion directive was automatically turned into a module import or null otherwise.
- SrcMgr::CharacteristicKind FileType
- The characteristic kind, indicates whether a file or directory holds normal user code, system code, or system code which is implicitly 'extern "C"' in C++ mode.
¶void LeftSubmodule(
clang::Module* M,
clang::SourceLocation ImportLoc,
bool ForPragma)
void LeftSubmodule(
clang::Module* M,
clang::SourceLocation ImportLoc,
bool ForPragma)
Description
Callback invoked whenever a submodule was left.
Declared at: clang/include/clang/Lex/PPCallbacks.h:478
Parameters
- clang::Module* M
- The submodule we have left.
- clang::SourceLocation ImportLoc
- The location of import directive token.
- bool ForPragma
- If entering from pragma directive.
¶void LexedFileChanged(
clang::FileID FID,
clang::PPCallbacks::LexedFileChangeReason
Reason,
SrcMgr::CharacteristicKind FileType,
clang::FileID PrevFID,
clang::SourceLocation Loc)
void LexedFileChanged(
clang::FileID FID,
clang::PPCallbacks::LexedFileChangeReason
Reason,
SrcMgr::CharacteristicKind FileType,
clang::FileID PrevFID,
clang::SourceLocation Loc)
Description
Callback invoked whenever the \p Lexer moves to a different file for lexing. Unlike \p FileChanged line number directives and other related pragmas do not trigger callbacks to \p LexedFileChanged.
Declared at: clang/include/clang/Lex/PPCallbacks.h:445
Parameters
- clang::FileID FID
- The \p FileID that the \p Lexer moved to.
- clang::PPCallbacks::LexedFileChangeReason Reason
- Whether the \p Lexer entered a new file or exited one.
- SrcMgr::CharacteristicKind FileType
- The \p CharacteristicKind of the file the \p Lexer moved to.
- clang::FileID PrevFID
- The \p FileID the \p Lexer was using before the change.
- clang::SourceLocation Loc
- The location where the \p Lexer entered a new file from or the location that the \p Lexer moved into after exiting a file.
¶void MacroDefined(
const clang::Token& MacroNameTok,
const clang::MacroDirective* MD)
void MacroDefined(
const clang::Token& MacroNameTok,
const clang::MacroDirective* MD)
Description
Hook called whenever a macro definition is seen.
Declared at: clang/include/clang/Lex/PPCallbacks.h:602
Parameters
- const clang::Token& MacroNameTok
- const clang::MacroDirective* MD
¶void MacroExpands(
const clang::Token& MacroNameTok,
const clang::MacroDefinition& MD,
clang::SourceRange Range,
const clang::MacroArgs* Args)
void MacroExpands(
const clang::Token& MacroNameTok,
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/include/clang/Lex/PPCallbacks.h:596
Parameters
- const clang::Token& MacroNameTok
- const clang::MacroDefinition& MD
- clang::SourceRange Range
- const clang::MacroArgs* Args
¶void MacroUndefined(
const clang::Token& MacroNameTok,
const clang::MacroDefinition& MD,
const clang::MacroDirective* Undef)
void MacroUndefined(
const clang::Token& MacroNameTok,
const clang::MacroDefinition& MD,
const clang::MacroDirective* Undef)
Description
Hook called whenever a macro # undef is seen. MD is released immediately following this callback.
Declared at: clang/include/clang/Lex/PPCallbacks.h:608
Parameters
- const clang::Token& MacroNameTok
- The active Token
- const clang::MacroDefinition& MD
- A MacroDefinition for the named macro.
- const clang::MacroDirective* Undef
- New MacroDirective if the macro was defined, null otherwise.
¶PPChainedCallbacks(
std::unique_ptr<PPCallbacks> _First,
std::unique_ptr<PPCallbacks> _Second)
PPChainedCallbacks(
std::unique_ptr<PPCallbacks> _First,
std::unique_ptr<PPCallbacks> _Second)
Declared at: clang/include/clang/Lex/PPCallbacks.h:432
Parameters
- std::unique_ptr<PPCallbacks> _First
- std::unique_ptr<PPCallbacks> _Second
¶void PragmaAssumeNonNullBegin(
clang::SourceLocation Loc)
void PragmaAssumeNonNullBegin(
clang::SourceLocation Loc)
Description
Callback invoked when a # pragma clang assume_nonnull begin directive is read.
Declared at: clang/include/clang/Lex/PPCallbacks.h:586
Parameters
¶void PragmaAssumeNonNullEnd(
clang::SourceLocation Loc)
void PragmaAssumeNonNullEnd(
clang::SourceLocation Loc)
Description
Callback invoked when a # pragma clang assume_nonnull end directive is read.
Declared at: clang/include/clang/Lex/PPCallbacks.h:591
Parameters
¶void PragmaComment(
clang::SourceLocation Loc,
const clang::IdentifierInfo* Kind,
llvm::StringRef Str)
void PragmaComment(
clang::SourceLocation Loc,
const clang::IdentifierInfo* Kind,
llvm::StringRef Str)
Description
Callback invoked when a # pragma comment directive is read.
Declared at: clang/include/clang/Lex/PPCallbacks.h:506
Parameters
- clang::SourceLocation Loc
- const clang::IdentifierInfo* Kind
- llvm::StringRef Str
¶void PragmaDebug(clang::SourceLocation Loc,
llvm::StringRef DebugType)
void PragmaDebug(clang::SourceLocation Loc,
llvm::StringRef DebugType)
Description
Callback invoked when a # pragma clang __debug directive is read.
Declared at: clang/include/clang/Lex/PPCallbacks.h:523
Parameters
- clang::SourceLocation Loc
- The location of the debug directive.
- llvm::StringRef DebugType
- The identifier following __debug.
¶void PragmaDetectMismatch(
clang::SourceLocation Loc,
llvm::StringRef Name,
llvm::StringRef Value)
void PragmaDetectMismatch(
clang::SourceLocation Loc,
llvm::StringRef Name,
llvm::StringRef Value)
Description
Callback invoked when a # pragma detect_mismatch directive is read.
Declared at: clang/include/clang/Lex/PPCallbacks.h:517
Parameters
- clang::SourceLocation Loc
- llvm::StringRef Name
- llvm::StringRef Value
¶void PragmaDiagnostic(clang::SourceLocation Loc,
llvm::StringRef Namespace,
diag::Severity mapping,
llvm::StringRef Str)
void PragmaDiagnostic(clang::SourceLocation Loc,
llvm::StringRef Namespace,
diag::Severity mapping,
llvm::StringRef Str)
Description
Callback invoked when a # pragma gcc diagnostic directive is read.
Declared at: clang/include/clang/Lex/PPCallbacks.h:544
Parameters
- clang::SourceLocation Loc
- llvm::StringRef Namespace
- diag::Severity mapping
- llvm::StringRef Str
¶void PragmaDiagnosticPop(
clang::SourceLocation Loc,
llvm::StringRef Namespace)
void PragmaDiagnosticPop(
clang::SourceLocation Loc,
llvm::StringRef Namespace)
Description
Callback invoked when a # pragma gcc diagnostic pop directive is read.
Declared at: clang/include/clang/Lex/PPCallbacks.h:539
Parameters
- clang::SourceLocation Loc
- llvm::StringRef Namespace
¶void PragmaDiagnosticPush(
clang::SourceLocation Loc,
llvm::StringRef Namespace)
void PragmaDiagnosticPush(
clang::SourceLocation Loc,
llvm::StringRef Namespace)
Description
Callback invoked when a # pragma gcc diagnostic push directive is read.
Declared at: clang/include/clang/Lex/PPCallbacks.h:534
Parameters
- clang::SourceLocation Loc
- llvm::StringRef Namespace
¶void PragmaDirective(
clang::SourceLocation Loc,
clang::PragmaIntroducerKind Introducer)
void PragmaDirective(
clang::SourceLocation Loc,
clang::PragmaIntroducerKind Introducer)
Description
Callback invoked when start reading any pragma directive.
Declared at: clang/include/clang/Lex/PPCallbacks.h:500
Parameters
- clang::SourceLocation Loc
- clang::PragmaIntroducerKind Introducer
¶void PragmaExecCharsetPop(
clang::SourceLocation Loc)
void PragmaExecCharsetPop(
clang::SourceLocation Loc)
Description
Callback invoked when a # pragma execution_character_set(pop) directive is read.
Declared at: clang/include/clang/Lex/PPCallbacks.h:581
Parameters
¶void PragmaExecCharsetPush(
clang::SourceLocation Loc,
llvm::StringRef Str)
void PragmaExecCharsetPush(
clang::SourceLocation Loc,
llvm::StringRef Str)
Description
Callback invoked when a # pragma execution_character_set(push) directive is read.
Declared at: clang/include/clang/Lex/PPCallbacks.h:576
Parameters
¶void PragmaMark(clang::SourceLocation Loc,
llvm::StringRef Trivia)
void PragmaMark(clang::SourceLocation Loc,
llvm::StringRef Trivia)
Description
Callback invoked when a # pragma mark comment is read.
Declared at: clang/include/clang/Lex/PPCallbacks.h:512
Parameters
- clang::SourceLocation Loc
- llvm::StringRef Trivia
¶void PragmaMessage(
clang::SourceLocation Loc,
llvm::StringRef Namespace,
clang::PPCallbacks::PragmaMessageKind Kind,
llvm::StringRef Str)
void PragmaMessage(
clang::SourceLocation Loc,
llvm::StringRef Namespace,
clang::PPCallbacks::PragmaMessageKind Kind,
llvm::StringRef Str)
Description
Callback invoked when a # pragma message directive is read.
Declared at: clang/include/clang/Lex/PPCallbacks.h:528
Parameters
- clang::SourceLocation Loc
- The location of the message directive.
- llvm::StringRef Namespace
- The namespace of the message directive.
- clang::PPCallbacks::PragmaMessageKind Kind
- The type of the message directive.
- llvm::StringRef Str
- The text of the message directive.
¶void PragmaOpenCLExtension(
clang::SourceLocation NameLoc,
const clang::IdentifierInfo* Name,
clang::SourceLocation StateLoc,
unsigned int State)
void PragmaOpenCLExtension(
clang::SourceLocation NameLoc,
const clang::IdentifierInfo* Name,
clang::SourceLocation StateLoc,
unsigned int State)
Description
Called when an OpenCL extension is either disabled or enabled with a pragma.
Declared at: clang/include/clang/Lex/PPCallbacks.h:554
Parameters
- clang::SourceLocation NameLoc
- const clang::IdentifierInfo* Name
- clang::SourceLocation StateLoc
- unsigned int State
¶void PragmaWarning(
clang::SourceLocation Loc,
clang::PPCallbacks::PragmaWarningSpecifier
WarningSpec,
ArrayRef<int> Ids)
void PragmaWarning(
clang::SourceLocation Loc,
clang::PPCallbacks::PragmaWarningSpecifier
WarningSpec,
ArrayRef<int> Ids)
Declared at: clang/include/clang/Lex/PPCallbacks.h:560
Parameters
- clang::SourceLocation Loc
- clang::PPCallbacks::PragmaWarningSpecifier WarningSpec
- ArrayRef<int> Ids
¶void PragmaWarningPop(clang::SourceLocation Loc)
void PragmaWarningPop(clang::SourceLocation Loc)
Description
Callback invoked when a # pragma warning(pop) directive is read.
Declared at: clang/include/clang/Lex/PPCallbacks.h:571
Parameters
¶void PragmaWarningPush(clang::SourceLocation Loc,
int Level)
void PragmaWarningPush(clang::SourceLocation Loc,
int Level)
Description
Callback invoked when a # pragma warning(push) directive is read.
Declared at: clang/include/clang/Lex/PPCallbacks.h:566
Parameters
- clang::SourceLocation Loc
- int Level
¶void SourceRangeSkipped(
clang::SourceRange Range,
clang::SourceLocation EndifLoc)
void SourceRangeSkipped(
clang::SourceRange Range,
clang::SourceLocation EndifLoc)
Description
Hook called when a source range is skipped.
Declared at: clang/include/clang/Lex/PPCallbacks.h:621
Parameters
- clang::SourceRange Range
- The SourceRange that was skipped. The range begins at the # if/ # else directive and ends after the # endif/ # else directive.
- clang::SourceLocation EndifLoc
- The end location of the 'endif' token, which may precede the range skipped by the directive (e.g excluding comments after an 'endif').
¶void moduleImport(clang::SourceLocation ImportLoc,
clang::ModuleIdPath Path,
const clang::Module* Imported)
void moduleImport(clang::SourceLocation ImportLoc,
clang::ModuleIdPath Path,
const clang::Module* Imported)
Description
Callback invoked whenever there was an explicit module-import syntax.
Declared at: clang/include/clang/Lex/PPCallbacks.h:484
Parameters
- clang::SourceLocation ImportLoc
- The location of import directive token.
- clang::ModuleIdPath Path
- The identifiers (and their locations) of the module "path", e.g., "std.vector" would be split into "std" and "vector".
- const clang::Module* Imported
- The imported module; can be null if importing failed.
¶~PPChainedCallbacks()
~PPChainedCallbacks()
Declared at: clang/include/clang/Lex/PPCallbacks.h:436