[PATCH] D25480: __builtin_fpclassify missing one int parameter
David Sheinkman via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 14 13:52:49 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL284277: __builtin_fpclassify missing one int parameter (authored by davidsh).
Changed prior to commit:
https://reviews.llvm.org/D25480?vs=74377&id=74740#toc
Repository:
rL LLVM
https://reviews.llvm.org/D25480
Files:
cfe/trunk/include/clang/Basic/Builtins.def
cfe/trunk/test/Sema/builtin-unary-fp.c
Index: cfe/trunk/include/clang/Basic/Builtins.def
===================================================================
--- cfe/trunk/include/clang/Basic/Builtins.def
+++ cfe/trunk/include/clang/Basic/Builtins.def
@@ -367,7 +367,7 @@
BUILTIN(__builtin_isunordered , "i.", "Fnc")
// Unary FP classification
-BUILTIN(__builtin_fpclassify, "iiiii.", "Fnc")
+BUILTIN(__builtin_fpclassify, "iiiiii.", "Fnc")
BUILTIN(__builtin_isfinite, "i.", "Fnc")
BUILTIN(__builtin_isinf, "i.", "Fnc")
BUILTIN(__builtin_isinf_sign, "i.", "Fnc")
Index: cfe/trunk/test/Sema/builtin-unary-fp.c
===================================================================
--- cfe/trunk/test/Sema/builtin-unary-fp.c
+++ cfe/trunk/test/Sema/builtin-unary-fp.c
@@ -11,6 +11,7 @@
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)); // 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, 0, 1, 0)); // expected-error{{too many arguments}}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25480.74740.patch
Type: text/x-patch
Size: 1323 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161014/86f68bf2/attachment.bin>
More information about the cfe-commits
mailing list