diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-04-12 08:45:55 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-04-12 08:45:55 +0000 |
| commit | 7a9c6d297375d735e0728c6f3a75b6068b40133f (patch) | |
| tree | ae04328e3309769fd236820f57360095e0bc5bc0 | |
| parent | 10644fac2fa29bcbb65e7e4ecdccf4e0e7b5f58a (diff) | |
| download | llvm-7a9c6d297375d735e0728c6f3a75b6068b40133f.zip llvm-7a9c6d297375d735e0728c6f3a75b6068b40133f.tar.gz llvm-7a9c6d297375d735e0728c6f3a75b6068b40133f.tar.bz2 | |
Merge forward-circular into protocol-test-2
llvm-svn: 68896
| -rw-r--r-- | clang/test/SemaObjC/protocol-forward-circular.m | 10 | ||||
| -rw-r--r-- | clang/test/SemaObjC/protocol-test-2.m | 11 |
2 files changed, 11 insertions, 10 deletions
diff --git a/clang/test/SemaObjC/protocol-forward-circular.m b/clang/test/SemaObjC/protocol-forward-circular.m deleted file mode 100644 index 804c44f..0000000 --- a/clang/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/clang/test/SemaObjC/protocol-test-2.m b/clang/test/SemaObjC/protocol-test-2.m index 265e5d26..1ccc2de 100644 --- a/clang/test/SemaObjC/protocol-test-2.m +++ b/clang/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 + |
