1// RUN: rm -rf %t && split-file %s %t && cd %t
2// RUN: %clangxx --coverage main.cpp -o t
3// RUN: %run ./t
4// RUN: llvm-cov gcov -t t-main. | FileCheck %s
5
6//--- main.cpp
7#include <stdio.h>
8
9int main(int argc, char *argv[]) { // CHECK: 2: [[#]]:int main
10 puts(s: ""); // CHECK-NEXT: 2: [[#]]:
11#line 3
12 puts(s: ""); // line 3
13 return 0; // line 4
14}
15// CHECK-NOT: {{^ +[0-9]+:}}
16

source code of compiler-rt/test/profile/Posix/gcov-file-change-line.cpp