aboutsummaryrefslogtreecommitdiff
path: root/test/CoverageMapping/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CoverageMapping/decl.c')
-rw-r--r--test/CoverageMapping/decl.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CoverageMapping/decl.c b/test/CoverageMapping/decl.c
new file mode 100644
index 000000000000..96ee30357a84
--- /dev/null
+++ b/test/CoverageMapping/decl.c
@@ -0,0 +1,15 @@
+// Ensure that declarations without definitions don't have maps emitted for them
+
+// RUN: %clang_cc1 -fprofile-instr-generate -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only %s > %t
+// FileCheck -input-file %t %s
+// RUN: FileCheck -check-prefix BAR -input-file %t %s
+
+// FOO: foo:
+// FOO-NOT: foo:
+inline int foo() { return 0; }
+extern inline int foo();
+
+// BAR: bar:
+// BAR-NOT: bar:
+int bar() { return 0; }
+extern int bar();