[PATCH] D55127: [OpenCL] Diagnose conflicting address spaces between template definition and its instantiation

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 30 10:05:39 PST 2018


rjmccall added inline comments.


================
Comment at: lib/Sema/SemaType.cpp:7232
+      if (D.getContext() == DeclaratorContext::TemplateArgContext)
+        // Do not deduce address space for non-pointee type in template arg.
+        ;
----------------
I don't understand what you're trying to do here.  Template arguments may need to be directly qualified with an address-space sometimes, and if you prevent that unconditionally you're going to break all sorts of things, like partially-specializing a template based on the presence of an address-space qualifier.


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

https://reviews.llvm.org/D55127





More information about the cfe-commits mailing list