File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -1597,8 +1597,12 @@ bool ByteCodeExprGen<Emitter>::VisitOffsetOfExpr(const OffsetOfExpr *E) {
1597
1597
template <class Emitter >
1598
1598
bool ByteCodeExprGen<Emitter>::VisitCXXScalarValueInitExpr(
1599
1599
const CXXScalarValueInitExpr *E) {
1600
- return this ->visitZeroInitializer (classifyPrim (E->getType ()), E->getType (),
1601
- E);
1600
+ QualType Ty = E->getType ();
1601
+
1602
+ if (Ty->isVoidType ())
1603
+ return true ;
1604
+
1605
+ return this ->visitZeroInitializer (classifyPrim (Ty), Ty, E);
1602
1606
}
1603
1607
1604
1608
template <class Emitter > bool ByteCodeExprGen<Emitter>::discard(const Expr *E) {
Original file line number Diff line number Diff line change @@ -56,6 +56,15 @@ namespace ScalarTypes {
56
56
};
57
57
static_assert (getScalar<E>() == First, " " );
58
58
// / FIXME: Member pointers.
59
+
60
+ #if __cplusplus >= 201402L
61
+ constexpr void Void (int n) {
62
+ void (n + 1 );
63
+ void ();
64
+ }
65
+ constexpr int void_test = (Void(0 ), 1 );
66
+ static_assert (void_test == 1 , " " );
67
+ #endif
59
68
}
60
69
61
70
namespace IntegralCasts {
You can’t perform that action at this time.
0 commit comments