summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CoverageMappingGen.cpp
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2017-09-11 20:47:42 +0000
committerVedant Kumar <vsk@apple.com>2017-09-11 20:47:42 +0000
commit3919a501f30688f0c4a03156fb672f381f03de5f (patch)
treeab649c95b8d89362f1dc95961206d117c1a09c4a /clang/lib/CodeGen/CoverageMappingGen.cpp
parent5d5aa214d83a7b90c8b8370e9449f32d4d6629b4 (diff)
downloadbcm5719-llvm-3919a501f30688f0c4a03156fb672f381f03de5f.tar.gz
bcm5719-llvm-3919a501f30688f0c4a03156fb672f381f03de5f.zip
[Lexer] Report more precise skipped regions (PR34166)
This patch teaches the preprocessor to report more precise source ranges for code that is skipped due to conditional directives. The new behavior includes the '#' from the opening directive and the full text of the line containing the closing directive in the skipped area. This matches up clang's behavior (we don't IRGen the code between the closing "endif" and the end of a line). This also affects the code coverage implementation. See llvm.org/PR34166 (this also happens to be rdar://problem/23224058). The old behavior (report the end of the skipped range as the end location of the 'endif' token) is preserved for indexing clients. Differential Revision: https://reviews.llvm.org/D36642 llvm-svn: 312947
Diffstat (limited to 'clang/lib/CodeGen/CoverageMappingGen.cpp')
-rw-r--r--clang/lib/CodeGen/CoverageMappingGen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CoverageMappingGen.cpp b/clang/lib/CodeGen/CoverageMappingGen.cpp
index f47dd07f0cc..cf736a484e5 100644
--- a/clang/lib/CodeGen/CoverageMappingGen.cpp
+++ b/clang/lib/CodeGen/CoverageMappingGen.cpp
@@ -29,7 +29,7 @@ using namespace clang;
using namespace CodeGen;
using namespace llvm::coverage;
-void CoverageSourceInfo::SourceRangeSkipped(SourceRange Range) {
+void CoverageSourceInfo::SourceRangeSkipped(SourceRange Range, SourceLocation) {
SkippedRanges.push_back(Range);
}
OpenPOWER on IntegriCloud