Anastasia added inline comments.

================
Comment at: lib/Sema/SemaType.cpp:6808
 
+static void deduceOpenCLImplicitAddrSpace(TypeProcessingState &State,
+                                          QualType &T, TypeAttrLocation TAL) {
----------------
Great! This looks so clear now!


================
Comment at: lib/Sema/SemaType.cpp:6810
+                                          QualType &T, TypeAttrLocation TAL) {
+  if (!State.getSema().getLangOpts().OpenCL ||
+      T.getAddressSpace() != LangAS::Default)
----------------
I think this could be checked before calling the function.


================
Comment at: lib/Sema/SemaType.cpp:6863
+  unsigned ImpAddr;
+  bool IsStatic = D.getDeclSpec().getStorageClassSpec() == 
DeclSpec::SCS_static;
+  // Put OpenCL automatic variable in private address space.
----------------
Do we cover `extern` too?


================
Comment at: lib/Sema/SemaType.cpp:6872
+      ImpAddr = LangAS::opencl_private;
+    else if (IsStatic)
+      ImpAddr = LangAS::opencl_global;
----------------
I think we can't have this case for CL1.2 see s6.8. But I think it could happen 
for `extern` though.


https://reviews.llvm.org/D35082



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to