================ @@ -2730,17 +2730,33 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, if (SemaBuiltinConstantArgRange(TheCall, 0, 0, 0xFFFF)) return ExprError(); - // -Wframe-address warning if non-zero passed to builtin - // return/frame address. Expr::EvalResult Result; if (!TheCall->getArg(0)->isValueDependent() && - TheCall->getArg(0)->EvaluateAsInt(Result, getASTContext()) && - Result.Val.getInt() != 0) - Diag(TheCall->getBeginLoc(), diag::warn_frame_address) - << ((BuiltinID == Builtin::BI__builtin_return_address) - ? "__builtin_return_address" - : "__builtin_frame_address") - << TheCall->getSourceRange(); + TheCall->getArg(0)->EvaluateAsInt(Result, getASTContext())) { + const char *BuiltinName = + (BuiltinID == Builtin::BI__builtin_return_address) + ? "__builtin_return_address" + : "__builtin_frame_address"; ---------------- AaronBallman wrote:
I don't think you need this, you should be able to use `ASTContext::BuiltinInfo` to call `getName(BuiltinID)`. https://github.com/llvm/llvm-project/pull/82966 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits