1 // RUN: %clang_profgen -x c++  -std=c++11 -fuse-ld=gold -fcoverage-mapping -o %t %s
2 // RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
3 // RUN: llvm-profdata merge -o %t.profdata %t.profraw
4 // RUN: llvm-cov show %t -instr-profile %t.profdata -filename-equivalence 2>&1 | FileCheck %s
5 
6 struct Base {
7   int B;
8   Base() : B(2) {}
9   Base(const struct Base &b2) {
10     if (b2.B == 0) {
11       B = b2.B + 1;
12     } else
13       B = b2.B;
14   }
15 };
16 
17 struct Derived : public Base {
18   Derived(const Derived &) = default; // CHECK:  2| [[@LINE]]|  Derived(const Derived &) = default;
19   Derived() = default;                // CHECK:  1| [[@LINE]]|  Derived() = default
20   int I;
21   int getI() { return I; }
22 };
23 
24 Derived dd;
25 int g;
26 int main() {
27   Derived dd2(dd);
28   Derived dd3(dd);
29 
30   g = dd2.getI() + dd3.getI();
31   return 0;
32 }
33