tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
I'm not 100% sure why this was done in the first place, but it doesn't work when the function makes assumptions about the stack of the caller, e.g. in the RVO case. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D135569 Files: clang/lib/AST/Interp/Context.cpp Index: clang/lib/AST/Interp/Context.cpp =================================================================== --- clang/lib/AST/Interp/Context.cpp +++ clang/lib/AST/Interp/Context.cpp @@ -44,8 +44,7 @@ if (!Func->isConstexpr()) return false; - APValue Dummy; - return Run(Parent, Func, Dummy); + return true; } bool Context::evaluateAsRValue(State &Parent, const Expr *E, APValue &Result) {
Index: clang/lib/AST/Interp/Context.cpp =================================================================== --- clang/lib/AST/Interp/Context.cpp +++ clang/lib/AST/Interp/Context.cpp @@ -44,8 +44,7 @@ if (!Func->isConstexpr()) return false; - APValue Dummy; - return Run(Parent, Func, Dummy); + return true; } bool Context::evaluateAsRValue(State &Parent, const Expr *E, APValue &Result) {
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits