Anastasia added inline comments.
================ Comment at: lib/Sema/SemaExpr.cpp:2670 } else { DestType = DestRecordType; FromRecordType = FromType; ---------------- rjmccall wrote: > This path (when the object is a gl-value) also needs an address-space > qualifier, so you should probably add it above and then just add a pointer in > the pointer case. I updated this but I haven't really found any test case that would fail. I guess because casting non-pointer types in different address spaces works fine... For example the IR is generated correctly with or without the fix. ``` 1 struct S { 2 volatile int a; 3 }; 4 5 __global S g; 6 7 void foo(){ 8 g.a; 9 } ``` However, I still think it's indeed good to add the address space in both cases for consistency. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58708/new/ https://reviews.llvm.org/D58708 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits