blob: 3b2dd6d719d6863e7a89073a63a2f55ffa850f9f [file] [log] [blame]
Pirama Arumuga Nainar98eaa622016-07-22 18:49:43 +00001// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL1.1
2// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL2.0
3
4typedef float float4 __attribute__((ext_vector_type(4)));
5
6void test_ext_vector_accessors(float4 V) {
7 V = V.wzyx;
8 V = V.abgr; // expected-warning {{vector component name 'a' is an OpenCL version 2.2 feature}}
9 V = V.xyzr; // expected-warning {{vector component name 'r' is an OpenCL version 2.2 feature}} \
10 // expected-error {{illegal vector component name 'r'}}
11}