diff options
Diffstat (limited to 'clang/test/SemaObjC/protocol-forward-circular.m')
-rw-r--r-- | clang/test/SemaObjC/protocol-forward-circular.m | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/protocol-forward-circular.m b/clang/test/SemaObjC/protocol-forward-circular.m new file mode 100644 index 00000000000..836d5b23507 --- /dev/null +++ b/clang/test/SemaObjC/protocol-forward-circular.m @@ -0,0 +1,10 @@ +// RUN: clang -fsyntax-only -verify %s + +@protocol B; +@protocol C < B > // expected-warning{{cannot find protocol definition for 'B'}} // expected-note{{previous definition is here}} +@end +@protocol A < C > +@end +@protocol B < A > // expected-error{{protocol has circular dependency}} +@end + |