minix/external/bsd/llvm/dist/clang/test/SemaObjC/property-choose-expr.m
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

14 lines
426 B
Objective-C

// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
// expected-no-diagnostics
@interface NSArray
-(int)count;
@end
// <rdar://problem/14438917>
char* f(NSArray *array) {
return _Generic(__builtin_choose_expr(__builtin_types_compatible_p(__typeof__(array.count), void), 0.f, array.count),
unsigned int:"uint",
float:"void",
default: "ignored");
}