|
clang
5.0.0
|
Simple wrapper class for chaining callbacks. More...
#include "clang/Lex/PPCallbacks.h"
Public Member Functions | |
| PPChainedCallbacks (std::unique_ptr< PPCallbacks > _First, std::unique_ptr< PPCallbacks > _Second) | |
| void | FileChanged (SourceLocation Loc, FileChangeReason Reason, SrcMgr::CharacteristicKind FileType, FileID PrevFID) override |
| Callback invoked whenever a source file is entered or exited. More... | |
| void | FileSkipped (const FileEntry &SkippedFile, const Token &FilenameTok, SrcMgr::CharacteristicKind FileType) override |
| Callback invoked whenever a source file is skipped as the result of header guard optimization. More... | |
| bool | FileNotFound (StringRef FileName, SmallVectorImpl< char > &RecoveryPath) override |
| Callback invoked whenever an inclusion directive results in a file-not-found error. More... | |
| void | InclusionDirective (SourceLocation HashLoc, const Token &IncludeTok, StringRef FileName, bool IsAngled, CharSourceRange FilenameRange, const FileEntry *File, StringRef SearchPath, StringRef RelativePath, const Module *Imported) override |
Callback invoked whenever an inclusion directive of any kind (#include, #import, etc.) has been processed, regardless of whether the inclusion will actually result in an inclusion. More... | |
| void | moduleImport (SourceLocation ImportLoc, ModuleIdPath Path, const Module *Imported) override |
| Callback invoked whenever there was an explicit module-import syntax. More... | |
| void | EndOfMainFile () override |
| Callback invoked when the end of the main file is reached. More... | |
| void | Ident (SourceLocation Loc, StringRef str) override |
| Callback invoked when a #ident or #sccs directive is read. More... | |
| void | PragmaComment (SourceLocation Loc, const IdentifierInfo *Kind, StringRef Str) override |
| Callback invoked when a #pragma comment directive is read. More... | |
| void | PragmaDetectMismatch (SourceLocation Loc, StringRef Name, StringRef Value) override |
| Callback invoked when a #pragma detect_mismatch directive is read. More... | |
| void | PragmaMessage (SourceLocation Loc, StringRef Namespace, PragmaMessageKind Kind, StringRef Str) override |
| Callback invoked when a #pragma message directive is read. More... | |
| void | PragmaDiagnosticPush (SourceLocation Loc, StringRef Namespace) override |
| Callback invoked when a #pragma gcc diagnostic push directive is read. More... | |
| void | PragmaDiagnosticPop (SourceLocation Loc, StringRef Namespace) override |
| Callback invoked when a #pragma gcc diagnostic pop directive is read. More... | |
| void | PragmaDiagnostic (SourceLocation Loc, StringRef Namespace, diag::Severity mapping, StringRef Str) override |
| Callback invoked when a #pragma gcc diagnostic directive is read. More... | |
| void | PragmaOpenCLExtension (SourceLocation NameLoc, const IdentifierInfo *Name, SourceLocation StateLoc, unsigned State) override |
| Called when an OpenCL extension is either disabled or enabled with a pragma. More... | |
| void | PragmaWarning (SourceLocation Loc, StringRef WarningSpec, ArrayRef< int > Ids) override |
| Callback invoked when a #pragma warning directive is read. More... | |
| void | PragmaWarningPush (SourceLocation Loc, int Level) override |
| Callback invoked when a #pragma warning(push) directive is read. More... | |
| void | PragmaWarningPop (SourceLocation Loc) override |
| Callback invoked when a #pragma warning(pop) directive is read. More... | |
| void | MacroExpands (const Token &MacroNameTok, const MacroDefinition &MD, SourceRange Range, const MacroArgs *Args) override |
| Called by Preprocessor::HandleMacroExpandedIdentifier when a macro invocation is found. More... | |
| void | MacroDefined (const Token &MacroNameTok, const MacroDirective *MD) override |
| Hook called whenever a macro definition is seen. More... | |
| void | MacroUndefined (const Token &MacroNameTok, const MacroDefinition &MD, const MacroDirective *Undef) override |
| Hook called whenever a macro #undef is seen. More... | |
| void | Defined (const Token &MacroNameTok, const MacroDefinition &MD, SourceRange Range) override |
| Hook called whenever the 'defined' operator is seen. More... | |
| void | SourceRangeSkipped (SourceRange Range) override |
| Hook called when a source range is skipped. More... | |
| void | If (SourceLocation Loc, SourceRange ConditionRange, ConditionValueKind ConditionValue) override |
| Hook called whenever an #if is seen. More... | |
| void | Elif (SourceLocation Loc, SourceRange ConditionRange, ConditionValueKind ConditionValue, SourceLocation IfLoc) override |
| Hook called whenever an #elif is seen. More... | |
| void | Ifdef (SourceLocation Loc, const Token &MacroNameTok, const MacroDefinition &MD) override |
| Hook called whenever an #ifdef is seen. More... | |
| void | Ifndef (SourceLocation Loc, const Token &MacroNameTok, const MacroDefinition &MD) override |
| Hook called whenever an #ifndef is seen. More... | |
| void | Else (SourceLocation Loc, SourceLocation IfLoc) override |
| Hook called whenever an #else is seen. More... | |
| void | Endif (SourceLocation Loc, SourceLocation IfLoc) override |
| Hook called whenever an #endif is seen. More... | |
Public Member Functions inherited from clang::PPCallbacks | |
| virtual | ~PPCallbacks () |
| virtual void | PragmaDirective (SourceLocation Loc, PragmaIntroducerKind Introducer) |
| Callback invoked when start reading any pragma directive. More... | |
| virtual void | PragmaDebug (SourceLocation Loc, StringRef DebugType) |
| Callback invoked when a #pragma clang __debug directive is read. More... | |
Additional Inherited Members | |
Public Types inherited from clang::PPCallbacks | |
| enum | FileChangeReason { EnterFile, ExitFile, SystemHeaderPragma, RenameFile } |
| enum | PragmaMessageKind { PMK_Message, PMK_Warning, PMK_Error } |
| Determines the kind of #pragma invoking a call to PragmaMessage. More... | |
| enum | ConditionValueKind { CVK_NotEvaluated, CVK_False, CVK_True } |
Simple wrapper class for chaining callbacks.
Definition at line 326 of file PPCallbacks.h.
|
inline |
Definition at line 331 of file PPCallbacks.h.
|
inlineoverridevirtual |
Hook called whenever the 'defined' operator is seen.
| MD | The MacroDirective if the name was a macro, null otherwise. |
Reimplemented from clang::PPCallbacks.
Definition at line 459 of file PPCallbacks.h.
|
inlineoverridevirtual |
Hook called whenever an #elif is seen.
Reimplemented from clang::PPCallbacks.
Definition at line 478 of file PPCallbacks.h.
|
inlineoverridevirtual |
Hook called whenever an #else is seen.
Reimplemented from clang::PPCallbacks.
Definition at line 499 of file PPCallbacks.h.
|
inlineoverridevirtual |
Hook called whenever an #endif is seen.
Reimplemented from clang::PPCallbacks.
Definition at line 505 of file PPCallbacks.h.
|
inlineoverridevirtual |
Callback invoked when the end of the main file is reached.
No subsequent callbacks will be made.
Reimplemented from clang::PPCallbacks.
Definition at line 374 of file PPCallbacks.h.
|
inlineoverridevirtual |
Callback invoked whenever a source file is entered or exited.
| Loc | Indicates the new location. |
| PrevFID | the file that was exited if Reason is ExitFile. |
Reimplemented from clang::PPCallbacks.
Definition at line 335 of file PPCallbacks.h.
|
inlineoverridevirtual |
Callback invoked whenever an inclusion directive results in a file-not-found error.
| FileName | The name of the file being included, as written in the source code. |
| RecoveryPath | If this client indicates that it can recover from this missing file, the client should set this as an additional header search patch. |
RecoveryPath as a header search path. Reimplemented from clang::PPCallbacks.
Definition at line 349 of file PPCallbacks.h.
|
inlineoverridevirtual |
Callback invoked whenever a source file is skipped as the result of header guard optimization.
| SkippedFile | The file that is skipped instead of entering #include |
| 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. |
Reimplemented from clang::PPCallbacks.
Definition at line 342 of file PPCallbacks.h.
|
inlineoverridevirtual |
Callback invoked when a #ident or #sccs directive is read.
| Loc | The location of the directive. |
| str | The text of the directive. |
Reimplemented from clang::PPCallbacks.
Definition at line 379 of file PPCallbacks.h.
|
inlineoverridevirtual |
Hook called whenever an #if is seen.
Reimplemented from clang::PPCallbacks.
Definition at line 471 of file PPCallbacks.h.
|
inlineoverridevirtual |
Hook called whenever an #ifdef is seen.
Reimplemented from clang::PPCallbacks.
Definition at line 485 of file PPCallbacks.h.
|
inlineoverridevirtual |
Hook called whenever an #ifndef is seen.
Reimplemented from clang::PPCallbacks.
Definition at line 492 of file PPCallbacks.h.
|
inlineoverridevirtual |
Callback invoked whenever an inclusion directive of any kind (#include, #import, etc.) has been processed, regardless of whether the inclusion will actually result in an inclusion.
| HashLoc | The location of the '#' that starts the inclusion directive. |
| IncludeTok | The token that indicates the kind of inclusion directive, e.g., 'include' or 'import'. |
| FileName | The name of the file being included, as written in the source code. |
| IsAngled | Whether the file name was enclosed in angle brackets; otherwise, it was enclosed in quotes. |
| FilenameRange | The character range of the quotes or angle brackets for the written file name. |
| File | The actual file that may be included by this inclusion directive. |
| 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". |
| RelativePath | The path relative to SearchPath, at which the include file was found. This is equal to FileName except for framework includes. |
| Imported | The module, whenever an inclusion directive was automatically turned into a module import or null otherwise. |
Reimplemented from clang::PPCallbacks.
Definition at line 355 of file PPCallbacks.h.
|
inlineoverridevirtual |
Hook called whenever a macro definition is seen.
Reimplemented from clang::PPCallbacks.
Definition at line 446 of file PPCallbacks.h.
|
inlineoverridevirtual |
Called by Preprocessor::HandleMacroExpandedIdentifier when a macro invocation is found.
Reimplemented from clang::PPCallbacks.
Definition at line 440 of file PPCallbacks.h.
|
inlineoverridevirtual |
Hook called whenever a macro #undef is seen.
| MacroNameTok | The active Token |
| MD | A MacroDefinition for the named macro. |
| Undef | New MacroDirective if the macro was defined, null otherwise. |
MD is released immediately following this callback.
Reimplemented from clang::PPCallbacks.
Definition at line 452 of file PPCallbacks.h.
|
inlineoverridevirtual |
Callback invoked whenever there was an explicit module-import syntax.
| ImportLoc | The location of import directive token. |
| Path | The identifiers (and their locations) of the module "path", e.g., "std.vector" would be split into "std" and "vector". |
| Imported | The imported module; can be null if importing failed. |
Reimplemented from clang::PPCallbacks.
Definition at line 368 of file PPCallbacks.h.
|
inlineoverridevirtual |
Callback invoked when a #pragma comment directive is read.
Reimplemented from clang::PPCallbacks.
Definition at line 384 of file PPCallbacks.h.
|
inlineoverridevirtual |
Callback invoked when a #pragma detect_mismatch directive is read.
Reimplemented from clang::PPCallbacks.
Definition at line 390 of file PPCallbacks.h.
|
inlineoverridevirtual |
Callback invoked when a #pragma gcc diagnostic directive is read.
Reimplemented from clang::PPCallbacks.
Definition at line 412 of file PPCallbacks.h.
|
inlineoverridevirtual |
Callback invoked when a #pragma gcc diagnostic pop directive is read.
Reimplemented from clang::PPCallbacks.
Definition at line 407 of file PPCallbacks.h.
|
inlineoverridevirtual |
Callback invoked when a #pragma gcc diagnostic push directive is read.
Reimplemented from clang::PPCallbacks.
Definition at line 402 of file PPCallbacks.h.
|
inlineoverridevirtual |
Callback invoked when a #pragma message directive is read.
| Loc | The location of the message directive. |
| Namespace | The namespace of the message directive. |
| Kind | The type of the message directive. |
| Str | The text of the message directive. |
Reimplemented from clang::PPCallbacks.
Definition at line 396 of file PPCallbacks.h.
|
inlineoverridevirtual |
Called when an OpenCL extension is either disabled or enabled with a pragma.
Reimplemented from clang::PPCallbacks.
Definition at line 418 of file PPCallbacks.h.
|
inlineoverridevirtual |
Callback invoked when a #pragma warning directive is read.
Reimplemented from clang::PPCallbacks.
Definition at line 424 of file PPCallbacks.h.
|
inlineoverridevirtual |
Callback invoked when a #pragma warning(pop) directive is read.
Reimplemented from clang::PPCallbacks.
Definition at line 435 of file PPCallbacks.h.
|
inlineoverridevirtual |
Callback invoked when a #pragma warning(push) directive is read.
Reimplemented from clang::PPCallbacks.
Definition at line 430 of file PPCallbacks.h.
|
inlineoverridevirtual |
Hook called when a source range is skipped.
| Range | The SourceRange that was skipped. The range begins at the #if/#else directive and ends after the #endif/#else directive. |
Reimplemented from clang::PPCallbacks.
Definition at line 465 of file PPCallbacks.h.
1.8.6