summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Modules/Inputs/macro-undef-through-pch/A.h2
-rw-r--r--clang/test/Modules/Inputs/macro-undef-through-pch/foo.h1
-rw-r--r--clang/test/Modules/Inputs/macro-undef-through-pch/module.map3
-rw-r--r--clang/test/Modules/macro-undef-through-pch.m8
4 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/macro-undef-through-pch/A.h b/clang/test/Modules/Inputs/macro-undef-through-pch/A.h
new file mode 100644
index 00000000000..6a2cc5cf6c2
--- /dev/null
+++ b/clang/test/Modules/Inputs/macro-undef-through-pch/A.h
@@ -0,0 +1,2 @@
+#define AB
+#undef AB
diff --git a/clang/test/Modules/Inputs/macro-undef-through-pch/foo.h b/clang/test/Modules/Inputs/macro-undef-through-pch/foo.h
new file mode 100644
index 00000000000..9d0256bdff2
--- /dev/null
+++ b/clang/test/Modules/Inputs/macro-undef-through-pch/foo.h
@@ -0,0 +1 @@
+@import A;
diff --git a/clang/test/Modules/Inputs/macro-undef-through-pch/module.map b/clang/test/Modules/Inputs/macro-undef-through-pch/module.map
new file mode 100644
index 00000000000..63f68ca5033
--- /dev/null
+++ b/clang/test/Modules/Inputs/macro-undef-through-pch/module.map
@@ -0,0 +1,3 @@
+module A {
+ header "A.h"
+}
diff --git a/clang/test/Modules/macro-undef-through-pch.m b/clang/test/Modules/macro-undef-through-pch.m
new file mode 100644
index 00000000000..ff0736ca998
--- /dev/null
+++ b/clang/test/Modules/macro-undef-through-pch.m
@@ -0,0 +1,8 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -x objective-c-header -fmodules -fmodules-cache-path=%t \
+// RUN: -I%S/Inputs/macro-undef-through-pch -emit-pch \
+// RUN: %S/Inputs/macro-undef-through-pch/foo.h -o %t.pch
+// RUN: %clang_cc1 -x objective-c -fmodules -fmodules-cache-path=%t -include-pch %t.pch %s
+
+// PR19215
+#undef AB
OpenPOWER on IntegriCloud