diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-09-03 17:53:25 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-09-03 17:53:25 +0000 |
commit | de1ec9cdcdb87a3e485d1c09217e3f3bd7b82346 (patch) | |
tree | 7bbe7f4ca3ae19a3dfeafaf6394b2bb362c197b0 /clang/test/SemaObjC/conditional-expr.m | |
parent | b1b9398ea7bd27a7a420b248ec1140ef9b33820d (diff) | |
download | bcm5719-llvm-de1ec9cdcdb87a3e485d1c09217e3f3bd7b82346.tar.gz bcm5719-llvm-de1ec9cdcdb87a3e485d1c09217e3f3bd7b82346.zip |
Improve type-checking of ?: for Objective-C types.
- Allow any Objective-C object types to devolve to type id in a ?:
expression. This matches gcc behavior more closely.
llvm-svn: 55705
Diffstat (limited to 'clang/test/SemaObjC/conditional-expr.m')
-rw-r--r-- | clang/test/SemaObjC/conditional-expr.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/SemaObjC/conditional-expr.m b/clang/test/SemaObjC/conditional-expr.m index e3cd041d3a5..2884fb4c988 100644 --- a/clang/test/SemaObjC/conditional-expr.m +++ b/clang/test/SemaObjC/conditional-expr.m @@ -29,7 +29,7 @@ id <DTOutputStreams> nextOutputStream = [self nextOutputStream]; // GCC warns about both of these. self = nextOutputStream; // expected-error {{incompatible type assigning 'id<DTOutputStreams>', expected 'DTFilterOutputStream2 *'}} - return nextOutputStream ? nextOutputStream : self; // expected-error {{incompatible operand types ('id<DTOutputStreams>' and 'DTFilterOutputStream2 *')}} + return nextOutputStream ? nextOutputStream : self; } @end @@ -39,6 +39,6 @@ id <DTOutputStreams> nextOutputStream = [self nextOutputStream]; // GCC warns about both of these as well (no errors). self = nextOutputStream; // expected-error {{incompatible type assigning 'id<DTOutputStreams>', expected 'DTFilterOutputStream3 *'}} - return nextOutputStream ? nextOutputStream : self; // expected-error {{incompatible operand types ('id<DTOutputStreams>' and 'DTFilterOutputStream3 *')}} + return nextOutputStream ? nextOutputStream : self; } @end |