tra added inline comments.
================ Comment at: clang/lib/CodeGen/CGBuiltin.cpp:18267-18271 + auto HalfSupport = HasHalfSupport(BuiltinID); + if (!HalfSupport.first) { + CGM.Error(E->getExprLoc(), + HalfSupport.second.append(" requires native half type support.") + .c_str()); ---------------- I think we can simplify it all further. ``` auto HasHalfSupport = [&](unsigned BuiltinID) { auto &Context = getContext(); return Context.getLangOpts().NativeHalfType || !Context.getTargetInfo().useFP16ConversionIntrinsics(); } ... if (!HasHalfSupport(BuiltinID)) { CGM.Error(E->getExprLoc(), getContext().BuiltinInfo.getName(BuiltinID) + " requires native half type support."); ``` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145238/new/ https://reviews.llvm.org/D145238 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits