<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello Pekka,<br>
<br>
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).<br>
<br>
On 2/2/2015 7:16 PM, Pekka Jääskeläinen wrote:<br>
<blockquote class=" cite" id="mid_54CF7FB2_70501_tut_fi"
cite="mid:54CF7FB2.70501@tut.fi" type="cite">
<blockquote class=" cite" id="Cite_6558433" type="cite">I do not
have a strong opinion on which one is more suitable/useful in
<br>
an error message. If we really want OpenCL names, then perhaps
we can
<br>
put implicit typedefs for all OpenCL vector types in
Sema::Initialize().
<br>
Then we could provide a way to retrieve them as QualTypes
instead of
<br>
creating them on the fly.
<br>
</blockquote>
<br>
I wonder why we could not do this? At least could have the
typedefs
<br>
defined by default there, while allowing overriding them with
target-
<br>
specific typedefs, if needed.
<br>
</blockquote>
<br>
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:<br>
<br>
<a class="moz-txt-link-freetext" href="http://thread.gmane.org/gmane.comp.compilers.clang.devel/40828">http://thread.gmane.org/gmane.comp.compilers.clang.devel/40828</a><br>
<br>
But the current patch by itself is a good improvement, and I would
prefer to look at those implicit typedefs some time later.<br>
<br>
Sameer.<br>
</body>
</html>