erichkeane added a comment. Type checking/value checking for this should happen during Sema, not codegen.
================ Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2049 + ConstantFP *Confidence_f = dyn_cast<ConstantFP>(Confidence); + if (!Confidence_f) { + CGM.Error(E->getArg(2)->getLocStart(), ---------------- This check should be able to be done during Sema. ================ Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2056 + if (prob < 0.0 || prob > 1.0) { + CGM.Error(E->getArg(2)->getLocStart(), + "probability of __builtin_expect_with_probability is " ---------------- Same as above, we shouldn't do this during Codegen. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79830/new/ https://reviews.llvm.org/D79830 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits