fhahn added a comment. Thanks for the update, it looks like it should be in line with @aaron.ballman's suggestions!
I think it might be good to split off the refactoring of `SemaBuiltinElementwiseMathOneArg`-> `PrepareBuiltinElementwiseMathOneArgCall` and the update for `BI__builtin_elementwise_abs` into a separate, non functional change (NFC). ================ Comment at: clang/lib/Sema/SemaChecking.cpp:2101 - case Builtin::BI__builtin_elementwise_abs: - if (SemaBuiltinElementwiseMathOneArg(TheCall)) + // __builtin_elementwise_abs estricts the element type to signed integers or + // floating point types only. ---------------- nit: typo estricts -> restricts? ================ Comment at: clang/lib/Sema/SemaChecking.cpp:2121 + + // __builtin_elementwise_abs estricts the element type to floating point + // types only. ---------------- nit: typo `estricts` -> `restricts`? It should also say `_ceil` instead of `_abs`, right? ================ Comment at: clang/lib/Sema/SemaChecking.cpp:16739 - QualType EltTy = TyA; - if (auto *VecTy = EltTy->getAs<VectorType>()) - EltTy = VecTy->getElementType(); - if (EltTy->isUnsignedIntegerType()) - return Diag(ArgLoc, diag::err_builtin_invalid_arg_type) - << 1 << /*signed integer or float ty*/ 3 << TyA; + if (checkMathBuiltinElementType(*this, A.get()->getBeginLoc(), TyA)) + return true; ---------------- w CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114688/new/ https://reviews.llvm.org/D114688 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits