summaryrefslogtreecommitdiffstats
path: root/clang/test/CoverageMapping/Inputs
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CoverageMapping/Inputs')
-rw-r--r--clang/test/CoverageMapping/Inputs/code.h11
-rw-r--r--clang/test/CoverageMapping/Inputs/header1.h31
2 files changed, 42 insertions, 0 deletions
diff --git a/clang/test/CoverageMapping/Inputs/code.h b/clang/test/CoverageMapping/Inputs/code.h
new file mode 100644
index 00000000000..cd3cfb5d3fe
--- /dev/null
+++ b/clang/test/CoverageMapping/Inputs/code.h
@@ -0,0 +1,11 @@
+x = x;
+if (x == 0) {
+ x = 1;
+} else {
+ x = 2;
+}
+if (true) {
+ x = x;
+} else {
+ x = x;
+}
diff --git a/clang/test/CoverageMapping/Inputs/header1.h b/clang/test/CoverageMapping/Inputs/header1.h
new file mode 100644
index 00000000000..d01e813b40b
--- /dev/null
+++ b/clang/test/CoverageMapping/Inputs/header1.h
@@ -0,0 +1,31 @@
+#ifndef HEADER1_H
+#define HEADER1_H
+
+inline void func(int i) {
+ int x = 0;
+ if (i == 0) {
+ x = 1;
+ } else {
+ x = 2;
+ }
+}
+static void static_func(int j) {
+ int x = 0;
+ if (j == x) {
+ x = !j;
+ } else {
+ x = 42;
+ }
+ j = x * j;
+}
+static void static_func2(int j) {
+ int x = 0;
+ if (j == x) {
+ x = !j;
+ } else {
+ x = 42;
+ }
+ j = x * j;
+}
+
+#endif // HEADER1_H
OpenPOWER on IntegriCloud