1 // RUN: %clang_cc1 -mllvm -emptyline-comment-coverage=false -std=c++11 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name system_macro.cpp -o - %s | FileCheck %s 2 3 #ifdef IS_SYSHEADER 4 5 #pragma clang system_header 6 #define Func(x) if (x) {} 7 #define SomeType int 8 9 #else 10 11 #define IS_SYSHEADER 12 #include __FILE__ 13 14 // CHECK-LABEL: doSomething 15 void doSomething(int x) { // CHECK: File 0, [[@LINE]]:25 -> {{[0-9:]+}} = #0 16 Func(x); 17 return; 18 SomeType *f; // CHECK: File 0, [[@LINE]]:11 -> {{[0-9:]+}} = 0 19 } 20 21 // CHECK-LABEL: main 22 int main() { // CHECK: File 0, [[@LINE]]:12 -> [[@LINE+2]]:2 = #0 23 Func([] { return true; }()); 24 } 25 26 #endif 27