Merge forward-circular into protocol-test-2


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68896 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaObjC/protocol-test-2.m b/test/SemaObjC/protocol-test-2.m
index 265e5d2..1ccc2de 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
+