[cfe-dev] [OpenCL patch] Vector literals are rvalues

Anton Lokhmotov Anton.Lokhmotov at arm.com
Wed Sep 21 06:16:26 PDT 2011


Clang currently accepts taking the address of a vector literal in the OpenCL
mode, e.g.

   return &((int4)(3,2,1,0)); // expected-error{{address expression must be
an lvalue}}

which is wrong (http://llvm.org/bugs/show_bug.cgi?id=10966).

Please review the attached patch that fixes this problem.

Thanks,
Anton.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: literals_rvalues.patch
Type: application/octet-stream
Size: 2035 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110921/3ebace50/attachment.obj>


More information about the cfe-dev mailing list