Home | History | Annotate | Download | only in SemaOpenCL
      1 // RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only
      2 
      3 void img2d_ro(__read_only image2d_t img) {} // expected-note{{passing argument to parameter 'img' here}} expected-note{{passing argument to parameter 'img' here}}
      4 
      5 void imgage_access_test(image2d_t img2dro, write_only image2d_t img2dwo, image3d_t img3dro) {
      6   img2d_ro(img2dro);
      7   img2d_ro(img2dwo); // expected-error{{passing '__write_only image2d_t' to parameter of incompatible type '__read_only image2d_t'}}
      8   img2d_ro(img3dro); // expected-error{{passing '__read_only image3d_t' to parameter of incompatible type '__read_only image2d_t'}}
      9 }
     10