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

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 4 04:59:47 PST 2018


Anastasia added a comment.

> Can you explain why the changes to `TreeTransform` are required?

When address spaces of template parameter and argument are given explicitly they might mismatch. For example, `foo1` (in the test) is instantiated with  `__local int` but the template parameter of `foo1` is  `__global T`. Currently clang fails to compile this with ICE while rebuilding the type that has multiple inconsistent addr space qualifiers. My patch fixes it, by giving an error instead of attempting to rebuild the type, that the addr space qualifiers mismatch.

There is another example of the same issue - `foo3`, but with non-pointer type.


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

https://reviews.llvm.org/D55127





More information about the cfe-commits mailing list