[clang] [clang] Use new interpreter in EvaluateAsConstantExpr if requested (PR #70763)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 14 06:10:27 PST 2023
================
@@ -129,7 +129,13 @@ class ByteCodeExprGen : public ConstStmtVisitor<ByteCodeExprGen<Emitter>, bool>,
/// Classifies a type.
std::optional<PrimType> classify(const Expr *E) const {
- return E->isGLValue() ? PT_Ptr : classify(E->getType());
+ if (E->isGLValue()) {
+ if (E->getType()->isFunctionType())
+ return PT_FnPtr;
+ return PT_Ptr;
+ }
+
+ return classify(E->getType());
----------------
AaronBallman wrote:
This feels unrelated to the patch title; can you explain it a bit more? (It doesn't seem wrong, just not seeing how it ties to the test behavior changes.)
https://github.com/llvm/llvm-project/pull/70763
More information about the cfe-commits
mailing list