summaryrefslogtreecommitdiff
path: root/clang/test/PCH/method-redecls.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/PCH/method-redecls.m')
-rw-r--r--clang/test/PCH/method-redecls.m18
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/PCH/method-redecls.m b/clang/test/PCH/method-redecls.m
new file mode 100644
index 0000000..9d02b6a
--- /dev/null
+++ b/clang/test/PCH/method-redecls.m
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -x objective-c %s -emit-pch -o %t
+// RUN: %clang_cc1 -x objective-c %s -emit-pch -o %t -D IMPL
+
+// Avoid infinite loop because of method redeclarations.
+
+@interface Foo
+-(void)meth;
+-(void)meth;
+-(void)meth;
+@end
+
+#ifdef IMPL
+
+@implementation Foo
+-(void)meth { }
+@end
+
+#endif