[PATCH] D135569: [clang][Interp] Don't run functions immediately after compiling them
Timm Bäder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 10 04:06:05 PDT 2022
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) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135569.466462.patch
Type: text/x-patch
Size: 406 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221010/0d20fb24/attachment.bin>
More information about the cfe-commits
mailing list