From a2b4d65020085a3b060433cd52bd20851a5e9dcd Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 12 Apr 2009 08:45:55 +0000 Subject: [PATCH] Merge forward-circular into protocol-test-2 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68896 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/SemaObjC/protocol-forward-circular.m | 10 ---------- test/SemaObjC/protocol-test-2.m | 11 +++++++++++ 2 files changed, 11 insertions(+), 10 deletions(-) delete mode 100644 test/SemaObjC/protocol-forward-circular.m 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 // 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 + -- 2.50.1