diff options
-rw-r--r-- | test/SemaObjC/protocol-forward-circular.m | 10 | ||||
-rw-r--r-- | test/SemaObjC/protocol-test-2.m | 11 |
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 + |