Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CoverageMapping / system_macro.cpp
blob725752553bcf7523dea4024a50dbb352904b3c0b
1 // RUN: %clang_cc1 -mllvm -emptyline-comment-coverage=false -mllvm -system-headers-coverage -std=c++11 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name system_macro.cpp -o - %s | FileCheck %s
3 #ifdef IS_SYSHEADER
5 #pragma clang system_header
6 #define Func(x) if (x) {}
7 #define SomeType int
9 #else
11 #define IS_SYSHEADER
12 #include __FILE__
14 // CHECK-LABEL: doSomething
15 void doSomething(int x) { // CHECK: File 0, [[@LINE]]:25 -> {{[0-9:]+}} = #0
16 Func(x); // CHECK: Expansion,File 0, [[@LINE]]:3 -> [[@LINE]]:7
17 return;
18 // CHECK: Expansion,File 0, [[@LINE+1]]:3 -> [[@LINE+1]]:11
19 SomeType *f; // CHECK: File 0, [[@LINE]]:11 -> {{[0-9:]+}} = 0
22 // CHECK-LABEL: main
23 int main() { // CHECK: File 0, [[@LINE]]:12 -> [[@LINE+2]]:2 = #0
24 Func([] { return true; }());
27 #endif