[PATCH] D55850: [OpenCL] Allow address spaces as method qualifiers

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 17 17:48:02 PST 2019


rjmccall added inline comments.


================
Comment at: lib/Parse/ParseDecl.cpp:6170
+          }
+        }
+      }
----------------
Anastasia wrote:
> rjmccall wrote:
> > Does this not need to diagnose redundant qualifiers?  Why is this path required in addition to the path in SemaType, anyway?
> We discussed earlier to collect addr space qualifiers for completeness: https://reviews.llvm.org/D55850#inline-495037
> 
> Without this change the following doesn't work for addr spaces correctly:
>   auto fGlob() __global -> decltype(this);
> I added a test that check this now in **test/SemaOpenCLCXX/address-space-of-this-class-scope.cl**.
> 
> Here we only collect the quals to be applied to 'this'. If there are multiple address space specified on a method it will be diagnosed in SemaType.cpp. I think we probably don't need to give the same diagnostic twice?
> 
Okay, if this is already diagnosed, it isn't a problem.  Please leave a comment to that effect.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55850/new/

https://reviews.llvm.org/D55850





More information about the cfe-commits mailing list