rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land.
================ Comment at: clang/lib/CodeGen/CGExprScalar.cpp:466-469 + // [expr.type.conv]: if the type is cv void and the initializer is () or {}, + // the expression is a prvalue of type void that performs no initialization. + QualType T = E->getType(); + return T->isVoidType() ? nullptr : EmitNullValue(T); ---------------- Would it make sense to put this check in `EmitNullValue` instead? That would also cover an `InitListExpr` for `void{}` (which we currently appear to incorrectly reject), and an `ImplicitValueInit` for type `void` (which I don't think can be created legitimately at the moment, but that could just be a failure of imagination on my part). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99466/new/ https://reviews.llvm.org/D99466 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits