[PATCH] D141591: [clang][Interp] Properly identify not-yet-defined functions
Timm Bäder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 1 00:25:22 PST 2023
tbaeder added inline comments.
================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1486
bool IsBeingCompiled = Func && !Func->isFullyCompiled();
- bool WasNotDefined = Func && !Func->hasBody();
+ bool WasNotDefined = Func && !Func->isConstexpr() && !Func->hasBody();
----------------
shafik wrote:
> Why the check for `isContexpr()`?
`isConstexpr()` just returns whether the function is valid (i.e. was compiled successfully). `hasBody()` can still return `false` for a valid function, if the funcdecl had no body.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141591/new/
https://reviews.llvm.org/D141591
More information about the cfe-commits
mailing list