aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-12 08:45:55 +0000
committerChris Lattner <sabre@nondot.org>2009-04-12 08:45:55 +0000
commita2b4d65020085a3b060433cd52bd20851a5e9dcd (patch)
tree985cacd9782edea3f0cccabab6f46e891970126e
parente2ac07a95ce5e76d995ad2afe8989bec6ea871e6 (diff)
Merge forward-circular into protocol-test-2
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68896 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/SemaObjC/protocol-forward-circular.m10
-rw-r--r--test/SemaObjC/protocol-test-2.m11
2 files changed, 11 insertions, 10 deletions
diff --git a/test/SemaObjC/protocol-forward-circular.m b/test/SemaObjC/protocol-forward-circular.m
deleted file mode 100644
index 804c44f6bf..0000000000
--- a/test/SemaObjC/protocol-forward-circular.m
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: clang-cc -fsyntax-only -verify %s
-
-@protocol B;
-@protocol C < B > // expected-note{{previous definition is here}}
-@end
-@protocol A < C >
-@end
-@protocol B < A > // expected-error{{protocol has circular dependency}}
-@end
-
diff --git a/test/SemaObjC/protocol-test-2.m b/test/SemaObjC/protocol-test-2.m
index 265e5d2691..1ccc2de93e 100644
--- a/test/SemaObjC/protocol-test-2.m
+++ b/test/SemaObjC/protocol-test-2.m
@@ -36,3 +36,14 @@
@protocol YY <XX> // Use of declaration of XX here should not cause a warning.
- zz;
@end
+
+
+// Detect circular dependencies.
+@protocol B;
+@protocol C < B > // expected-note{{previous definition is here}}
+@end
+@protocol A < C >
+@end
+@protocol B < A > // expected-error{{protocol has circular dependency}}
+@end
+