//RUN: %clang_cc1 -cl-std=CL2.0 -fsyntax-only -verify %s
kernel void B ;
}
void parse_order_error {
// Ensure we properly diagnose OpenCL loop attributes on the incorrect
// subject in the presence of other attributes.
int i = 1000;
__attribute__ // expected-error {{'opencl_unroll_hint' attribute only applies to 'for', 'while', and 'do' statements}}
if { parse_order_error; } // Recursive call silences unrelated diagnostic about nomerge.
__attribute__ // expected-error {{'opencl_unroll_hint' attribute only applies to 'for', 'while', and 'do' statements}}
if { parse_order_error; } // Recursive call silences unrelated diagnostic about nomerge.
__attribute__ // OK
while { parse_order_error; } // Recursive call silences unrelated diagnostic about nomerge.
}
{
__attribute__ // expected-error {{'opencl_unroll_hint' attribute only applies to 'for', 'while', and 'do' statements}}
if
x[0] = 15