xref: /minix3/external/bsd/llvm/dist/clang/test/Sema/builtin-unary-fp.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -fsyntax-only -verify -pedantic
2*f4a2713aSLionel Sambuc void check(int);
a()3*f4a2713aSLionel Sambuc void a() {
4*f4a2713aSLionel Sambuc   check(__builtin_isfinite(1.0f));
5*f4a2713aSLionel Sambuc   check(__builtin_isinf(1.0));
6*f4a2713aSLionel Sambuc   check(__builtin_isinf_sign(1.0L));
7*f4a2713aSLionel Sambuc   check(__builtin_isnan(1.0f));
8*f4a2713aSLionel Sambuc   check(__builtin_isnormal(1.0f));
9*f4a2713aSLionel Sambuc   check(__builtin_isfinite(1)); // expected-error{{requires argument of floating point type}}
10*f4a2713aSLionel Sambuc   check(__builtin_isinf()); // expected-error{{too few arguments}}
11*f4a2713aSLionel Sambuc   check(__builtin_isnan(1,2)); // expected-error{{too many arguments}}
12*f4a2713aSLionel Sambuc   check(__builtin_fpclassify(0, 0, 0, 0, 0, 1.0));
13*f4a2713aSLionel Sambuc   check(__builtin_fpclassify(0, 0, 0, 0, 0, 1)); // expected-error{{requires argument of floating point type}}
14*f4a2713aSLionel Sambuc   check(__builtin_fpclassify(0, 0, 0, 0, 1)); // expected-error{{too few arguments}}
15*f4a2713aSLionel Sambuc   check(__builtin_fpclassify(0, 0, 0, 0, 0, 1, 0)); // expected-error{{too many arguments}}
16*f4a2713aSLionel Sambuc }
17