// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL2.0
// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=clc++
// Taken from opencl-c.h
#define CLK_NULL_EVENT ; // expected-error {{the '__global clk_event_t' type cannot be used to declare a program scope variable}}
int clk_event_tests {
event_t e;
clk_event_t ce1;
clk_event_t ce2;
clk_event_t ce3 = CLK_NULL_EVENT;
// FIXME: Not obvious if this should give an error as if it was in program scope.
static clk_event_t ce4;
if { // expected-error {{invalid operands to binary expression }}
return 9;
}
if {
return 1;
}
else if {
return 0;
}
return 2;
}
global clk_event_t ce