clang/test/SemaObjC/property-choose-expr.m
raw| 1 | // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s |
| 2 | // expected-no-diagnostics |
| 3 | |
| 4 | @interface NSArray |
| 5 | -(int)count; |
| 6 | @end |
| 7 | |
| 8 | char* f(NSArray *array) { |
| 9 | return _Generic(__builtin_choose_expr(__builtin_types_compatible_p(__typeof__(array.count), void), 0.f, array.count), |
| 10 | unsigned int:"uint", |
| 11 | float:"void", |
| 12 | default: "ignored"); |
| 13 | } |