forked from OSchip/llvm-project
__builtin_fpclassify missing one int parameter
Patch by Tania Albarghouthi. Differential Revision: https://reviews.llvm.org/D25480 llvm-svn: 284277
This commit is contained in:
parent
0cd65429be
commit
c37a49896a
|
@ -367,7 +367,7 @@ BUILTIN(__builtin_islessgreater , "i.", "Fnc")
|
||||||
BUILTIN(__builtin_isunordered , "i.", "Fnc")
|
BUILTIN(__builtin_isunordered , "i.", "Fnc")
|
||||||
|
|
||||||
// Unary FP classification
|
// Unary FP classification
|
||||||
BUILTIN(__builtin_fpclassify, "iiiii.", "Fnc")
|
BUILTIN(__builtin_fpclassify, "iiiiii.", "Fnc")
|
||||||
BUILTIN(__builtin_isfinite, "i.", "Fnc")
|
BUILTIN(__builtin_isfinite, "i.", "Fnc")
|
||||||
BUILTIN(__builtin_isinf, "i.", "Fnc")
|
BUILTIN(__builtin_isinf, "i.", "Fnc")
|
||||||
BUILTIN(__builtin_isinf_sign, "i.", "Fnc")
|
BUILTIN(__builtin_isinf_sign, "i.", "Fnc")
|
||||||
|
|
|
@ -11,6 +11,7 @@ void a() {
|
||||||
check(__builtin_isnan(1,2)); // expected-error{{too many arguments}}
|
check(__builtin_isnan(1,2)); // expected-error{{too many arguments}}
|
||||||
check(__builtin_fpclassify(0, 0, 0, 0, 0, 1.0));
|
check(__builtin_fpclassify(0, 0, 0, 0, 0, 1.0));
|
||||||
check(__builtin_fpclassify(0, 0, 0, 0, 0, 1)); // expected-error{{requires argument of floating point type}}
|
check(__builtin_fpclassify(0, 0, 0, 0, 0, 1)); // expected-error{{requires argument of floating point type}}
|
||||||
|
check(__builtin_fpclassify(0, 1, 2, 3, 4.5, 5.0)); // expected-warning{{implicit conversion from 'double' to 'int' changes value from 4.5 to 4}}
|
||||||
check(__builtin_fpclassify(0, 0, 0, 0, 1)); // expected-error{{too few arguments}}
|
check(__builtin_fpclassify(0, 0, 0, 0, 1)); // expected-error{{too few arguments}}
|
||||||
check(__builtin_fpclassify(0, 0, 0, 0, 0, 1, 0)); // expected-error{{too many arguments}}
|
check(__builtin_fpclassify(0, 0, 0, 0, 0, 1, 0)); // expected-error{{too many arguments}}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue