[clang] [clang][AST] Stop creating `ConstantExpr` nodes without a result (PR #229761)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 14 21:58:57 PDT 2026
================
@@ -329,6 +329,9 @@ ConstantExpr::getStorageKind(const Type *T, const ASTContext &Context) {
ConstantExpr::ConstantExpr(Expr *SubExpr, ConstantResultStorageKind StorageKind,
bool IsImmediateInvocation)
: FullExpr(ConstantExprClass, SubExpr) {
+
+ if (!SubExpr->getType()->isVoidType())
----------------
tbaederr wrote:
I think I should probably remove the assertion altogether in this PR, it belongs in https://github.com/llvm/llvm-project/pull/230388
https://github.com/llvm/llvm-project/pull/229761
More information about the cfe-commits
mailing list