mikael marked 4 inline comments as done.
mikael added inline comments.

================
Comment at: lib/Sema/SemaDecl.cpp:3196
+
+    QualType AdjustedQT = QualType(AdjustedType, 0);
+    LangAS AS = Old->getType().getAddressSpace();
----------------
When merging the class function and the file context function the address space 
was lost here.


================
Comment at: lib/Sema/SemaType.cpp:4831
+        if (state.getSema().getLangOpts().OpenCLCPlusPlus &&
+            ((DC && DC->isRecord()) ||
+             state.getDeclarator().getContext() ==
----------------
The first issue was that if a function is declared outside of a class this code 
did not deduce it. Now it does.


================
Comment at: lib/Sema/TreeTransform.h:4277
   //   cv-qualifiers are ignored.
-  if (T->isFunctionType())
+  // OpenCL: The address space should not be ignored.
+  if (T->isFunctionType()) {
----------------
Another place where the address space was removed.


================
Comment at: test/SemaOpenCLCXX/address-space-templates.cl:7
   T f1();     // expected-error{{function type may not be qualified with an 
address space}}
-  void f2(T); // expected-error{{parameter may not be qualified with an 
address space}}
+  // FIXME: Should only get the error message once.
+  void f2(T); // expected-error{{parameter may not be qualified with an 
address space}} expected-error{{parameter may not be qualified with an address 
space}}
----------------
This was the remaining issue that I have not solved yet. It looked like this 
issue was not so trivial so I think it makes sense to postpone it.


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

https://reviews.llvm.org/D54862



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

Reply via email to