[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / CoverageMapping / test.c
blob9ebae5537bb1fa15514a05e17ac5d2e4a0ab5037
1 // RUN: %clang_cc1 -mllvm -emptyline-comment-coverage=false -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name test.c %s | FileCheck %s
3 void bar(void);
4 static void static_func(void);
6 // CHECK: main
7 int main(void) { // CHECK-NEXT: File 0, [[@LINE]]:16 -> [[@LINE+8]]:2 = #0
8 // CHECK-NEXT: File 0, [[@LINE+2]]:18 -> [[@LINE+2]]:24 = (#0 + #1)
9 // CHECK-NEXT: Branch,File 0, [[@LINE+1]]:18 -> [[@LINE+1]]:24 = #1, #0
10 for(int i = 0; i < 10; ++i) { // CHECK-NEXT: File 0, [[@LINE]]:26 -> [[@LINE]]:29 = #1
11 bar(); // CHECK: File 0, [[@LINE-1]]:31 -> [[@LINE+1]]:4 = #1
13 static_func();
14 return 0;
17 // CHECK-NEXT: foo
18 void foo(void) { // CHECK-NEXT: File 0, [[@LINE]]:16 -> [[@LINE+5]]:2 = #0
19 // CHECK-NEXT: File 0, [[@LINE+1]]:6 -> [[@LINE+1]]:7 = #0
20 if(1) { // CHECK: File 0, [[@LINE]]:9 -> [[@LINE+2]]:4 = #1
21 int i = 0;
25 // CHECK-NEXT: bar
26 void bar(void) { // CHECK-NEXT: File 0, [[@LINE]]:16 -> [[@LINE+1]]:2 = #0
29 // CHECK-NEXT: static_func
30 void static_func(void) { } // CHECK: File 0, [[@LINE]]:24 -> [[@LINE]]:27 = #0
32 // CHECK-NEXT: func
33 static void func(void) { } // CHECK: File 0, [[@LINE]]:24 -> [[@LINE]]:27 = 0