diff options
author | Steve Naroff <snaroff@apple.com> | 2007-07-29 16:33:31 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2007-07-29 16:33:31 +0000 |
commit | ddf5a1d7a6be3d55bcd65c28758cd392dc9a87b7 (patch) | |
tree | 2d8b795e9be5ae2248846b351e7d969b6f156b5c /llvm/test/C++Frontend | |
parent | 5fecb80efac9466926aaadb3d9e67b78bc71fd21 (diff) | |
download | bcm5719-llvm-ddf5a1d7a6be3d55bcd65c28758cd392dc9a87b7.tar.gz bcm5719-llvm-ddf5a1d7a6be3d55bcd65c28758cd392dc9a87b7.zip |
Implement pretty diagnostics when doing on-the-fly vector sizing (for vector component access).
For example, before this commit, the following diagnostics would be emitted...
ocu.c:49:12: error: incompatible types assigning 'float __attribute__((ocu_vector_type(3)))' to 'float4'
vec4_2 = vec4.rgb; // shorten
~~~~~~ ^ ~~~~~~~~
ocu.c:51:7: error: incompatible types assigning 'float __attribute__((ocu_vector_type(2)))' to 'float'
f = vec2.xx; // shorten
~ ^ ~~~~~~~
Now, the diagnostics look as you would expect...
ocu.c:49:12: error: incompatible types assigning 'float3' to 'float4'
vec4_2 = vec4.rgb; // shorten
~~~~~~ ^ ~~~~~~~~
ocu.c:51:7: error: incompatible types assigning 'float2' to 'float'
f = vec2.xx; // shorten
~ ^ ~~~~~~~
llvm-svn: 40579
Diffstat (limited to 'llvm/test/C++Frontend')
0 files changed, 0 insertions, 0 deletions