summaryrefslogtreecommitdiffstats
path: root/include/clang/Lex/PPCallbacks.h
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-09-27 17:32:05 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-09-27 17:32:05 +0000
commit6b4ff04dd22e7159887ea6c1bb8b1c01fc9c70a9 (patch)
tree4a15c324b49024ac3b02ea2d40ec29114c4eece6 /include/clang/Lex/PPCallbacks.h
parentb201e16e0c331b0bdeae7b30f9f79aae32beb1b2 (diff)
Introduce a callback to PPCallbacks for lines skipped by the preprocessor.
Patch by Jason Haslam! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140612 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/PPCallbacks.h')
-rw-r--r--include/clang/Lex/PPCallbacks.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/clang/Lex/PPCallbacks.h b/include/clang/Lex/PPCallbacks.h
index 767bffa8fb..9273d19b9c 100644
--- a/include/clang/Lex/PPCallbacks.h
+++ b/include/clang/Lex/PPCallbacks.h
@@ -158,6 +158,12 @@ public:
/// MI is released immediately following this callback.
virtual void MacroUndefined(const Token &MacroNameTok, const MacroInfo *MI) {
}
+
+ /// SourceRangeSkipped - This hook is 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.
+ virtual void SourceRangeSkipped(SourceRange Range) {
+ }
/// If -- This hook is called whenever an #if is seen.
/// \param Range The SourceRange of the expression being tested.
@@ -286,6 +292,11 @@ public:
Second->MacroUndefined(MacroNameTok, MI);
}
+ virtual void SourceRangeSkipped(SourceRange Range) {
+ First->SourceRangeSkipped(Range);
+ Second->SourceRangeSkipped(Range);
+ }
+
/// If -- This hook is called whenever an #if is seen.
virtual void If(SourceRange Range) {
First->If(Range);