aboutsummaryrefslogtreecommitdiff
path: root/pp-trace
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2017-09-11 20:47:45 +0000
committerVedant Kumar <vsk@apple.com>2017-09-11 20:47:45 +0000
commitab91a552160a68946a1ae710feb1637df796e460 (patch)
treed28f035cb2f04eb3a8573bc5bac5ef02d145b7cd /pp-trace
parent65938c9a4f07f0d45050ee1915389e2621e2d5f2 (diff)
downloadclang-tools-extra-ab91a552160a68946a1ae710feb1637df796e460.tar.gz
[pp-trace] Update skipped source ranges in tests
Depends on D36642 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@312948 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'pp-trace')
-rw-r--r--pp-trace/PPCallbacksTracker.cpp5
-rw-r--r--pp-trace/PPCallbacksTracker.h3
2 files changed, 5 insertions, 3 deletions
diff --git a/pp-trace/PPCallbacksTracker.cpp b/pp-trace/PPCallbacksTracker.cpp
index ca634d2d..4bb126c0 100644
--- a/pp-trace/PPCallbacksTracker.cpp
+++ b/pp-trace/PPCallbacksTracker.cpp
@@ -342,9 +342,10 @@ void PPCallbacksTracker::Defined(const clang::Token &MacroNameTok,
}
// Hook called when a source range is skipped.
-void PPCallbacksTracker::SourceRangeSkipped(clang::SourceRange Range) {
+void PPCallbacksTracker::SourceRangeSkipped(clang::SourceRange Range,
+ clang::SourceLocation EndifLoc) {
beginCallback("SourceRangeSkipped");
- appendArgument("Range", Range);
+ appendArgument("Range", clang::SourceRange(Range.getBegin(), EndifLoc));
}
// Hook called whenever an #if is seen.
diff --git a/pp-trace/PPCallbacksTracker.h b/pp-trace/PPCallbacksTracker.h
index 65c7fa15..7b57d346 100644
--- a/pp-trace/PPCallbacksTracker.h
+++ b/pp-trace/PPCallbacksTracker.h
@@ -145,7 +145,8 @@ public:
void Defined(const clang::Token &MacroNameTok,
const clang::MacroDefinition &MD,
clang::SourceRange Range) override;
- void SourceRangeSkipped(clang::SourceRange Range) override;
+ void SourceRangeSkipped(clang::SourceRange Range,
+ clang::SourceLocation EndifLoc) override;
void If(clang::SourceLocation Loc, clang::SourceRange ConditionRange,
ConditionValueKind ConditionValue) override;
void Elif(clang::SourceLocation Loc, clang::SourceRange ConditionRange,