llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) <details> <summary>Changes</summary> It's potentially costly, so only do it once. --- Full diff: https://github.com/llvm/llvm-project/pull/141473.diff 1 Files Affected: - (modified) clang/lib/AST/ExprConstant.cpp (+4-3) ``````````diff diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index e9a269337404a..39fc714402728 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -8468,10 +8468,11 @@ class ExprEvaluatorBase const FunctionDecl *Definition = nullptr; Stmt *Body = FD->getBody(Definition); + SourceLocation Loc = E->getExprLoc(); - if (!CheckConstexprFunction(Info, E->getExprLoc(), FD, Definition, Body) || - !HandleFunctionCall(E->getExprLoc(), Definition, This, E, Args, Call, - Body, Info, Result, ResultSlot)) + if (!CheckConstexprFunction(Info, Loc, FD, Definition, Body) || + !HandleFunctionCall(Loc, Definition, This, E, Args, Call, Body, Info, + Result, ResultSlot)) return false; if (!CovariantAdjustmentPath.empty() && `````````` </details> https://github.com/llvm/llvm-project/pull/141473 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits