[clang] [llvm] [clang][builtin] Implement __builtin_allow_runtime_check (PR #87568)

Vitaly Buka via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 12 16:19:11 PDT 2024


================
@@ -3233,6 +3233,17 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID,
     if (BuiltinCountZeroBitsGeneric(*this, TheCall))
       return ExprError();
     break;
+
+  case Builtin::BI__builtin_allow_runtime_check: {
+    Expr *Arg = TheCall->getArg(0);
+    // Check if the argument is a string literal.
+    if (!isa<StringLiteral>(Arg->IgnoreParenImpCasts())) {
----------------
vitalybuka wrote:

Resolving in favor of the longer thread above.

https://github.com/llvm/llvm-project/pull/87568


More information about the cfe-commits mailing list