Mercurial > hg > CbC > CbC_llvm
comparison clang/test/CoverageMapping/preprocessor.c @ 236:c4bab56944e8 llvm-original
LLVM 16
author | kono |
---|---|
date | Wed, 09 Nov 2022 17:45:10 +0900 |
parents | 79ff65ed7e25 |
children |
comparison
equal
deleted
inserted
replaced
232:70dce7da266c | 236:c4bab56944e8 |
---|---|
1 // RUN: %clang_cc1 -mllvm -emptyline-comment-coverage=false -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name preprocessor.c %s | FileCheck %s | 1 // RUN: %clang_cc1 -mllvm -emptyline-comment-coverage=false -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name preprocessor.c %s | FileCheck %s |
2 | 2 |
3 // CHECK: func | 3 // CHECK: func |
4 void func() { // CHECK: File 0, [[@LINE]]:13 -> [[@LINE+5]]:2 = #0 | 4 void func(void) {// CHECK: File 0, [[@LINE]]:17 -> [[@LINE+5]]:2 = #0 |
5 int i = 0; | 5 int i = 0; |
6 #ifdef MACRO // CHECK-NEXT: Skipped,File 0, [[@LINE]]:1 -> [[@LINE+2]]:7 = 0 | 6 #ifdef MACRO // CHECK-NEXT: Skipped,File 0, [[@LINE]]:1 -> [[@LINE+2]]:7 = 0 |
7 int x = i; | 7 int x = i; |
8 #endif | 8 #endif |
9 } | 9 } |
10 | 10 |
11 // CHECK: main | 11 // CHECK: main |
12 int main() { // CHECK-NEXT: File 0, [[@LINE]]:12 -> {{[0-9]+}}:2 = #0 | 12 int main(void) { // CHECK-NEXT: File 0, [[@LINE]]:16 -> {{[0-9]+}}:2 = #0 |
13 int i = 0; | 13 int i = 0; |
14 #if 0 // CHECK-NEXT: Skipped,File 0, [[@LINE]]:1 -> [[@LINE+4]]:29 = 0 | 14 #if 0 // CHECK-NEXT: Skipped,File 0, [[@LINE]]:1 -> [[@LINE+4]]:29 = 0 |
15 if(i == 0) { | 15 if(i == 0) { |
16 i = 1; | 16 i = 1; |
17 } | 17 } |