32 lines · cpp
1// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++11 -fcoverage-mcdc -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only %s | FileCheck %s2 3extern void foo();4extern void bar();5class Value {6 public:7 void setValue( int len );8 int getValue( void );9 Value(); // This is the constructor declaration10 ~Value(); // This is the destructor declaration11 12 private:13 int value;14};15 16// Member functions definitions including constructor17Value::Value(void) {18 if (value == 2 || value == 6)19 foo();20}21Value::~Value(void) {22 if (value == 2 || value == 3)23 bar();24}25 26// CHECK-LABEL: Decision,File 0, 18:7 -> 18:31 = M:3, C:227// CHECK-NEXT: Branch,File 0, 18:7 -> 18:17 = (#0 - #2), #2 [1,0,2]28// CHECK: Branch,File 0, 18:21 -> 18:31 = (#2 - #3), #3 [2,0,0]29// CHECK-LABEL: Decision,File 0, 22:7 -> 22:31 = M:3, C:230// CHECK-NEXT: Branch,File 0, 22:7 -> 22:17 = (#0 - #2), #2 [1,0,2]31// CHECK: Branch,File 0, 22:21 -> 22:31 = (#2 - #3), #3 [2,0,0]32