Similar to typedefs we shouldn't deduce addr space in type alias.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Sema/SemaType.cpp | ||
---|---|---|
7355 ↗ | (On Diff #201905) | I think this should also check for !IsPointee as it breaks the following example with error: cannot initialize a variable of type 'c_ptr' (aka 'c1 *') with an rvalue of type 'c1 *'. struct c1 { int x; }; using c_ptr = c1*; __kernel void test2() { c1 x = { 0 }; c1* y = &x; // okay c_ptr z = &x; // fails } |
test/SemaOpenCLCXX/address-space-deduction.cl | ||
1 ↗ | (On Diff #201905) | I guess it's an oversight from previous reviews, but FileCheck is not called here. |
5 ↗ | (On Diff #201905) | The pattern should probably be: //CHECK: |-VarDecl {{.*}} foo 'const __global int' constexpr cinit (i.e. move the {{.*}} before foo). |
10 ↗ | (On Diff #201905) | This check fails for me because inline is "missing" between static and constexpr. Not sure if it makes sense for foo2 to be inline or not, but that's a different story. |
Comment Actions
- Exclude pointee from early return in addr space deduction
- Improved testing: added FileCheck and avoid testing unnecessary bits