1#pragma clang diagnostic ignored "-Wmissing-prototypes" 2 3#include <metal_stdlib> 4#include <simd/simd.h> 5 6using namespace metal; 7 8struct EmptyStructTest 9{ 10}; 11struct EmptyStruct2Test 12{ 13 EmptyStructTest _m0; 14}; 15 16static inline __attribute__((always_inline)) 17float GetValue(thread const EmptyStruct2Test& self) 18{ 19 return 0.0; 20} 21 22static inline __attribute__((always_inline)) 23float GetValue_1(EmptyStruct2Test self) 24{ 25 return 0.0; 26} 27 28fragment void main0() 29{ 30 EmptyStruct2Test emptyStruct; 31 float value = GetValue(emptyStruct); 32 value = GetValue_1(EmptyStruct2Test{ EmptyStructTest{ } }); 33 value = GetValue_1(EmptyStruct2Test{ { } }); 34} 35 36