clang/test/SemaObjCXX/composite-objc-pointertype.mm
raw| 1 | // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s |
| 2 | // expected-no-diagnostics |
| 3 | |
| 4 | @interface Foo |
| 5 | @end |
| 6 | |
| 7 | @implementation Foo |
| 8 | - (id)test { |
| 9 | id bar; |
| 10 | Class cl; |
| 11 | Foo *f; |
| 12 | |
| 13 | (void)((bar!= 0) ? bar : 0); |
| 14 | (void)((cl != 0) ? cl : 0); |
| 15 | (void)((f != 0) ? 0 : f); |
| 16 | return (0 == 1) ? 0 : bar; |
| 17 | } |
| 18 | @end |
| 19 | |
| 20 | @class A; |
| 21 | |
| 22 | void multilevel() { |
| 23 | A **p; |
| 24 | const A **q; |
| 25 | |
| 26 | using T = decltype(true ? q : p); |
| 27 | using T = const A * const *; |
| 28 | } |
| 29 |