[PATCH] D135569: [clang][Interp] Don't run functions immediately after compiling them
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 10 11:41:34 PDT 2022
aaron.ballman added a comment.
This function is testing whether something is potentially a constant expression. Something might not be a valid constant expression for two reasons: 1) it uses some prohibited language construct, 2) it hit undefined behavior. You don't know if you hit undefined behavior until you run the function, so could that be why the function was being run? However, I don't know how you would run an arbitrary function that might accept arguments, so the `Run` call does look suspicious -- especially because it landed in the initial patch of the functionality (https://reviews.llvm.org/D64146) without comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135569/new/
https://reviews.llvm.org/D135569
More information about the cfe-commits
mailing list