diff options
Diffstat (limited to 'test/CoverageMapping/builtinmacro.c')
-rw-r--r-- | test/CoverageMapping/builtinmacro.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CoverageMapping/builtinmacro.c b/test/CoverageMapping/builtinmacro.c new file mode 100644 index 0000000..a023abc --- /dev/null +++ b/test/CoverageMapping/builtinmacro.c @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -fprofile-instr-generate -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name builtinmacro.c %s | FileCheck %s + +// Test the coverage mapping generation for built-in macroes. + +// CHECK: filename +const char *filename (const char *name) { // CHECK-NEXT: File 0, [[@LINE]]:41 -> [[@LINE+3]]:2 = #0 (HasCodeBefore = 0) + static const char this_file[] = __FILE__; + return this_file; +} + +int main() { // CHECK-NEXT: main + filename(__FILE__ "test.c"); + return 0; +} |