xref: /llvm-project/clang/test/SemaObjC/property-choose-expr.m (revision 0f1c1be1968076d6f96f8a7bcc4a15cf195ecd97)
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
8char* 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}
14