[clang] [clang][bytecode] Use SmallVector for Function::Code (PR #151821)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 2 11:58:19 PDT 2025
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/151821 at github.com>
================
@@ -44,12 +44,12 @@ bool Context::isPotentialConstantExpr(State &Parent, const FunctionDecl *FD) {
Compiler<ByteCodeEmitter>(*this, *P).compileFunc(
FD, const_cast<Function *>(Func));
- ++EvalID;
- // And run it.
- if (!Run(Parent, Func))
+ if (!Func->isValid())
return false;
- return Func->isValid();
+ ++EvalID;
+ // And run it.
----------------
shafik wrote:
I wonder how useful this inline comments are, I feel like that might be condensed and added to the comment on the declaration of `isPotentialConstantExpr` something like
"Check if the function is a potential constant expression by compiling the function and running it."
https://github.com/llvm/llvm-project/pull/151821
More information about the cfe-commits
mailing list