File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -284,6 +284,14 @@ static BlockDtorFn getDtorPrim(PrimType Type) {
284
284
}
285
285
286
286
static BlockMoveFn getMovePrim (PrimType Type) {
287
+ if (Type == PT_Float)
288
+ return moveTy<PrimConv<PT_Float>::T>;
289
+ if (Type == PT_IntAP)
290
+ return moveTy<PrimConv<PT_IntAP>::T>;
291
+ if (Type == PT_IntAPS)
292
+ return moveTy<PrimConv<PT_IntAPS>::T>;
293
+ if (Type == PT_MemberPtr)
294
+ return moveTy<PrimConv<PT_MemberPtr>::T>;
287
295
COMPOSITE_TYPE_SWITCH (Type, return moveTy<T>, return nullptr );
288
296
}
289
297
Original file line number Diff line number Diff line change @@ -60,3 +60,11 @@ namespace MoveFnWorks {
60
60
}
61
61
static_assert (dtor_calls_dtor(), " " );
62
62
}
63
+
64
+ namespace PrimitiveMoveFn {
65
+ // / This used to crash.
66
+ void test () {
67
+ const float y = 100 ;
68
+ const float &x = y;
69
+ }
70
+ }
You can’t perform that action at this time.
0 commit comments