Timm =?utf-8?q?Bäder?= <tbae...@redhat.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/151...@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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to