diff options
Diffstat (limited to 'include/clang/Lex/PPCallbacks.h')
-rw-r--r-- | include/clang/Lex/PPCallbacks.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/clang/Lex/PPCallbacks.h b/include/clang/Lex/PPCallbacks.h index 45c2d18da6e2b..2448b34c8af49 100644 --- a/include/clang/Lex/PPCallbacks.h +++ b/include/clang/Lex/PPCallbacks.h @@ -276,6 +276,12 @@ public: SourceRange Range) { } + /// Hook called when a '__has_include' or '__has_include_next' directive is + /// read. + virtual void HasInclude(SourceLocation Loc, StringRef FileName, bool IsAngled, + const FileEntry *File, + SrcMgr::CharacteristicKind FileType) {} + /// Hook called when a source range is skipped. /// \param Range The SourceRange that was skipped. The range begins at the /// \#if/\#else directive and ends after the \#endif/\#else directive. @@ -443,6 +449,13 @@ public: Second->PragmaDiagnostic(Loc, Namespace, mapping, Str); } + void HasInclude(SourceLocation Loc, StringRef FileName, bool IsAngled, + const FileEntry *File, + SrcMgr::CharacteristicKind FileType) override { + First->HasInclude(Loc, FileName, IsAngled, File, FileType); + Second->HasInclude(Loc, FileName, IsAngled, File, FileType); + } + void PragmaOpenCLExtension(SourceLocation NameLoc, const IdentifierInfo *Name, SourceLocation StateLoc, unsigned State) override { First->PragmaOpenCLExtension(NameLoc, Name, StateLoc, State); |