[PATCH] D152351: [clang] Add __builtin_isfpclass
Qiu Chaofan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 7 03:06:42 PDT 2023
qiucf added a comment.
It's necessary to check range of first argument in `SemaChecking.cpp` using `SemaBuiltinConstantArgRange`.
_Bool check_isfpclass_1(float x) { return __builtin_isfpclass(123456, x); } // ICE
int g;
// error: cannot compile this builtin function yet
// there's better diagnostics when 1st argument is not constant
_Bool check_isfpclass_2(float x) { return __builtin_isfpclass(g, x); }
================
Comment at: clang/include/clang/Basic/Builtins.def:491
BUILTIN(__builtin_isnormal, "i.", "FnctE")
+BUILTIN(__builtin_isfpclass, "iCi.", "nctE")
----------------
Why these intrinsics' type spec end with dot? I thought they are for vaargs.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152351/new/
https://reviews.llvm.org/D152351
More information about the cfe-commits
mailing list