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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to