blob: b0ce360005a8679be032a2c8eb76bed83720a37b [file] [log] [blame]
Justin Bogner682bfbf2015-05-14 22:14:10 +00001// RUN: %clang_cc1 -fprofile-instr-generate -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name system_macro.c -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:
15void 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
20}
21
22int main() {}
23
24#endif