summaryrefslogtreecommitdiffstats
path: root/test/Index/pch-with-module.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/Index/pch-with-module.m')
-rw-r--r--test/Index/pch-with-module.m23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/Index/pch-with-module.m b/test/Index/pch-with-module.m
new file mode 100644
index 0000000..e839c81
--- /dev/null
+++ b/test/Index/pch-with-module.m
@@ -0,0 +1,23 @@
+// RUN: rm -rf %t.cache
+// RUN: c-index-test -write-pch %t.h.pch %s -target x86_64-apple-macosx10.7 -fobjc-arc -fmodules-cache-path=%t.cache -fmodules -F %S/../Modules/Inputs -Xclang -fdisable-module-hash
+// RUN: %clang -fsyntax-only %s -target x86_64-apple-macosx10.7 -include %t.h -fobjc-arc -fmodules-cache-path=%t.cache -fmodules -F %S/../Modules/Inputs \
+// RUN: -Xclang -fdisable-module-hash -Xclang -detailed-preprocessing-record -Xclang -verify
+
+// expected-no-diagnostics
+
+#ifndef PCH_HEADER
+#define PCH_HEADER
+
+#include <Module/Module.h>
+
+@interface Module(PCHCat)
+-(id)PCH_meth;
+@end
+
+#else
+
+void foo(Module *m) {
+ [m PCH_meth];
+}
+
+#endif
OpenPOWER on IntegriCloud