summaryrefslogtreecommitdiffstats
path: root/clang/test/CoverageMapping/moremacros.c
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2018-05-30 23:35:44 +0000
committerVedant Kumar <vsk@apple.com>2018-05-30 23:35:44 +0000
commit61763b65af94107b75ec5be8797b7a845c626930 (patch)
tree274b6dfca8ecba0211b98b045a3952a0cf5b39b0 /clang/test/CoverageMapping/moremacros.c
parente3c1fb8b124246343f20b98f4035b61dd3ccd7df (diff)
downloadbcm5719-llvm-61763b65af94107b75ec5be8797b7a845c626930.tar.gz
bcm5719-llvm-61763b65af94107b75ec5be8797b7a845c626930.zip
[Coverage] Discard the last uncompleted deferred region in a decl
Discard the last uncompleted deferred region in a decl, if one exists. This prevents lines at the end of a function containing only whitespace or closing braces from being marked as uncovered, if they follow a region terminator (return/break/etc). The previous behavior was to heuristically complete deferred regions at the end of a decl. In practice this ended up being too brittle for too little gain. Users would complain that there was no way to reach full code coverage because whitespace at the end of a function would be marked uncovered. rdar://40238228 Differential Revision: https://reviews.llvm.org/D46918 llvm-svn: 333609
Diffstat (limited to 'clang/test/CoverageMapping/moremacros.c')
-rw-r--r--clang/test/CoverageMapping/moremacros.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/CoverageMapping/moremacros.c b/clang/test/CoverageMapping/moremacros.c
index 88411f3ba91..5e0d4a6abf2 100644
--- a/clang/test/CoverageMapping/moremacros.c
+++ b/clang/test/CoverageMapping/moremacros.c
@@ -31,7 +31,7 @@ int main(int argc, const char *argv[]) {
if (!argc) {
return 0;
// CHECK-NEXT: Expansion,File 0, [[@LINE+1]]:3 -> [[@LINE+1]]:8 = #4
- RBRAC // CHECK-NEXT: [[@LINE]]:8 -> [[@LINE+1]]:2 = (((#0 - #2) - #3) - #4)
+ RBRAC
}
// CHECK-NEXT: File 1, 3:15 -> 3:16 = #2
OpenPOWER on IntegriCloud