[PATCH] D70981: [opencl] Fix address space deduction on array variables.

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 4 05:38:59 PST 2019


Anastasia accepted this revision.
Anastasia added a comment.
This revision is now accepted and ready to land.

LGTM! Thanks! Please address the comment in your final commit.



================
Comment at: clang/lib/Sema/SemaDecl.cpp:6136
+      if (!OrigTy.getQualifiers().hasAddressSpace() && OrigTy->isArrayType()) {
+        OrigTy = Context.getAddrSpaceQualType(OrigTy, ImplAS);
+        OrigTy = QualType(Context.getAsArrayType(OrigTy), 0);
----------------
Maybe we should add a comment that we are adding an addr space on an array type first and then propagate to the element type.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70981





More information about the cfe-commits mailing list