diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-04-18 21:16:59 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-04-18 21:16:59 +0000 |
commit | 7c2bdcb4d30f2d370b4367664e6a11b075ce2cb3 (patch) | |
tree | 090ea30505c9686a74578d0c73f37080dac8be2a /test/SemaObjC/conditional-expr-8.m | |
parent | 877ded8532736d49b3cda8708cf0e5e9c44a760b (diff) |
Fix a bug in calculation of composite type
of conditional expressions of objc pointer types
where one type is the immediate base type of the
other. // rdar://9296866
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129718 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjC/conditional-expr-8.m')
-rw-r--r-- | test/SemaObjC/conditional-expr-8.m | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/SemaObjC/conditional-expr-8.m b/test/SemaObjC/conditional-expr-8.m new file mode 100644 index 0000000000..6799983e3b --- /dev/null +++ b/test/SemaObjC/conditional-expr-8.m @@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +// rdar://9296866 + +@interface NSResponder +@end + + +@interface NSView : NSResponder +@end + +@interface WebView : NSView +@end + +@protocol WebDocumentView +@end + +@implementation NSView + +- (void) FUNC : (id)s { + WebView *m_webView; + NSView <WebDocumentView> *documentView; + NSView *coordinateView = s ? documentView : m_webView; +} +@end + |