summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/test')
-rw-r--r--clang-tools-extra/test/modularize/Inputs/CompileError/HasError.h2
-rw-r--r--clang-tools-extra/test/modularize/Inputs/CompileError/Level1A.h1
-rw-r--r--clang-tools-extra/test/modularize/Inputs/CompileError/module.modulemap10
-rw-r--r--clang-tools-extra/test/modularize/ProblemsCompileError.modularize3
-rw-r--r--clang-tools-extra/test/modularize/ProblemsDisplayLists.modularize16
5 files changed, 32 insertions, 0 deletions
diff --git a/clang-tools-extra/test/modularize/Inputs/CompileError/HasError.h b/clang-tools-extra/test/modularize/Inputs/CompileError/HasError.h
new file mode 100644
index 00000000000..4395cb166de
--- /dev/null
+++ b/clang-tools-extra/test/modularize/Inputs/CompileError/HasError.h
@@ -0,0 +1,2 @@
+typedef WithoutDep BadType;
+
diff --git a/clang-tools-extra/test/modularize/Inputs/CompileError/Level1A.h b/clang-tools-extra/test/modularize/Inputs/CompileError/Level1A.h
new file mode 100644
index 00000000000..10eef6787e4
--- /dev/null
+++ b/clang-tools-extra/test/modularize/Inputs/CompileError/Level1A.h
@@ -0,0 +1 @@
+#define MACRO_1A 1
diff --git a/clang-tools-extra/test/modularize/Inputs/CompileError/module.modulemap b/clang-tools-extra/test/modularize/Inputs/CompileError/module.modulemap
new file mode 100644
index 00000000000..fbb8e7db4d1
--- /dev/null
+++ b/clang-tools-extra/test/modularize/Inputs/CompileError/module.modulemap
@@ -0,0 +1,10 @@
+// module.map
+
+module Level1A {
+ header "Level1A.h"
+ export *
+}
+module HasError {
+ header "HasError.h"
+ export *
+}
diff --git a/clang-tools-extra/test/modularize/ProblemsCompileError.modularize b/clang-tools-extra/test/modularize/ProblemsCompileError.modularize
new file mode 100644
index 00000000000..a7ad29862b1
--- /dev/null
+++ b/clang-tools-extra/test/modularize/ProblemsCompileError.modularize
@@ -0,0 +1,3 @@
+# RUN: not modularize %S/Inputs/CompileError/module.modulemap 2>&1 | FileCheck %s
+
+# CHECK: {{.*}}{{[/\\]}}Inputs{{[/\\]}}CompileError{{[/\\]}}HasError.h:1:9: error: unknown type name 'WithoutDep'
diff --git a/clang-tools-extra/test/modularize/ProblemsDisplayLists.modularize b/clang-tools-extra/test/modularize/ProblemsDisplayLists.modularize
new file mode 100644
index 00000000000..31be95c6b6b
--- /dev/null
+++ b/clang-tools-extra/test/modularize/ProblemsDisplayLists.modularize
@@ -0,0 +1,16 @@
+# RUN: not modularize -display-file-lists %S/Inputs/CompileError/module.modulemap 2>&1 | FileCheck %s
+
+# CHECK: {{.*}}{{[/\\]}}Inputs{{[/\\]}}CompileError{{[/\\]}}HasError.h:1:9: error: unknown type name 'WithoutDep'
+
+# CHECK: These are the files with possible errors:
+
+# CHECK: Inputs/CompileError/HasError.h
+
+# CHECK: These are the files with no detected errors:
+
+# CHECK: Inputs/CompileError/Level1A.h
+
+# CHECK: These are the combined files, with problem files preceded by #:
+
+# CHECK: {{.*}}Inputs/CompileError/HasError.h
+# CHECK: Inputs/CompileError/Level1A.h
OpenPOWER on IntegriCloud