Hi,

This LGTM and I agree with what you write.

On 02/03/2015 11:37 AM, Sameer Sahasrabuddhe wrote:
Hello Pekka,

Attached another version with a small change ... replacing
DefaultLvalueConversion() with calls to the more general
DefaultFunctionArrayLvalueConversion(). This improves the error message
printed when the ternary operator encounters a function pointer (see
last negative test in cond.cl).

On 2/2/2015 7:16 PM, Pekka Jääskeläinen wrote:
I do not have a strong opinion on which one is more suitable/useful in
an error message. If we really want OpenCL names, then perhaps we can
put implicit typedefs for all OpenCL vector types in Sema::Initialize().
Then we could provide a way to retrieve them as QualTypes instead of
creating them on the fly.

I wonder why we could not do this? At least could have the typedefs
defined by default there, while allowing overriding them with target-
specific typedefs, if needed.

Yes we can do this, and I would be happy to put it on my to-do list.
Note that this has more uses than pretty printing in error messages.
There was a similar request recently from someone writing a
source-to-source transform, and getting those ugly ext_vector attributes
instead of OpenCL vector names:

http://thread.gmane.org/gmane.comp.compilers.clang.devel/40828

But the current patch by itself is a good improvement, and I would
prefer to look at those implicit typedefs some time later.

Sameer.


--
--Pekka

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to