summaryrefslogtreecommitdiffstats
path: root/clang/test/CoverageMapping/macro-expansion.c
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2017-10-17 06:51:54 +0000
committerVedant Kumar <vsk@apple.com>2017-10-17 06:51:54 +0000
commite5f06a81a870a6c3e1caa5203d9fceed45c1d0e1 (patch)
tree93162f61ce96e68fdf2a41cea87d179065f19df7 /clang/test/CoverageMapping/macro-expansion.c
parent1e0f1f476a4f3d922002969c1bd3513c9808149e (diff)
downloadbcm5719-llvm-e5f06a81a870a6c3e1caa5203d9fceed45c1d0e1.tar.gz
bcm5719-llvm-e5f06a81a870a6c3e1caa5203d9fceed45c1d0e1.zip
[Coverage] Explicitly mark the l.h.s of && and || (fixes PR33465)
This makes it possible to view sub-line region counts for the l.h.s of && and || expressions in coverage reports. It also fixes PR33465, which shows an example of incorrect coverage output for an assignment statement containing '||'. llvm-svn: 315979
Diffstat (limited to 'clang/test/CoverageMapping/macro-expansion.c')
-rw-r--r--clang/test/CoverageMapping/macro-expansion.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/test/CoverageMapping/macro-expansion.c b/clang/test/CoverageMapping/macro-expansion.c
index 3fca97584aa..4e525580863 100644
--- a/clang/test/CoverageMapping/macro-expansion.c
+++ b/clang/test/CoverageMapping/macro-expansion.c
@@ -23,10 +23,12 @@
// CHECK-NEXT: Expansion,File 4, [[@LINE+2]]:20 -> [[@LINE+2]]:22 = (#0 + #8)
// CHECK-NEXT: File 4, [[@LINE+1]]:36 -> [[@LINE+1]]:37 = (#0 + #8)
#define M3(x) do { M2(x); } while (0)
-// CHECK-NEXT: File 5, [[@LINE+2]]:15 -> [[@LINE+2]]:27 = #0
+// CHECK-NEXT: File 5, [[@LINE+3]]:15 -> [[@LINE+3]]:27 = #0
+// CHECK-NEXT: File 5, [[@LINE+2]]:16 -> [[@LINE+2]]:19 = #0
// CHECK-NEXT: File 5, [[@LINE+1]]:23 -> [[@LINE+1]]:26 = #12
#define M4(x) ((x) && (x))
-// CHECK-NEXT: File 6, [[@LINE+2]]:15 -> [[@LINE+2]]:27 = #0
+// CHECK-NEXT: File 6, [[@LINE+3]]:15 -> [[@LINE+3]]:27 = #0
+// CHECK-NEXT: File 6, [[@LINE+2]]:16 -> [[@LINE+2]]:19 = #0
// CHECK-NEXT: File 6, [[@LINE+1]]:23 -> [[@LINE+1]]:26 = #14
#define M5(x) ((x) || (x))
// CHECK-NEXT: File 7, [[@LINE+1]]:15 -> [[@LINE+1]]:26 = #0
OpenPOWER on IntegriCloud