[clang] [clang][ast]: Add DynamicAllocLValue and TypeInfoLValue support to APValue::dump(). (PR #135178)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 11 00:21:49 PDT 2025
tbaederr wrote:
I don't think we can test `DynamicAllocLValue` like this, since we can't save it in the `APValue` for an initialized global. You'll have to add a call to `dump()` e.g. like:
```diff
diff --git i/clang/lib/AST/ExprConstant.cpp w/clang/lib/AST/ExprConstant.cpp
index d1cc722fb794..df52ff82ea2a 100644
--- i/clang/lib/AST/ExprConstant.cpp
+++ w/clang/lib/AST/ExprConstant.cpp
@@ -17087,6 +17087,8 @@ bool Expr::EvaluateAsInitializer(APValue &Value, const ASTContext &Ctx,
return false;
}
+ Value.dump();
+
// At this point, any lifetime-extended temporaries are completely
// initialized.
Info.performLifetimeExtension();
```
to reproduce it.
https://github.com/llvm/llvm-project/pull/135178
More information about the cfe-commits
mailing list