================
@@ -6450,6 +6451,40 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl 
GD, unsigned BuiltinID,
     auto Str = CGM.GetAddrOfConstantCString(Name, "");
     return RValue::get(Str.getPointer());
   }
+  case Builtin::BI__builtin_ct_select: {
+    if (E->getNumArgs() != 3) {
+      CGM.getDiags().Report(E->getBeginLoc(),
+                            E->getNumArgs() > 3
+                                ? diag::err_typecheck_call_too_many_args
+                                : diag::err_typecheck_call_too_few_args);
+      return GetUndefRValue(E->getType());
----------------
efriedma-quic wrote:

We shouldn't be generating diagnostics here; Sema should have already generated 
the relevant diagnostics, and if Sema generates a diagnostic, we don't reach 
codegen.

https://github.com/llvm/llvm-project/pull/166703
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to