blob: 2596ccca96382a7bbcd5ea7eb8f27f7e22ab59c8 [file] [log] [blame]
// RUN: %clang %s -Xclang -verify -fsyntax-only
// RUN: %clang %s -cl-no-stdinc -Xclang -verify -DNOINC -fsyntax-only
#ifndef NOINC
//expected-no-diagnostics
#endif
void test() {
int i = get_global_id(0);
#ifdef NOINC
//expected-error@-2{{implicit declaration of function 'get_global_id' is invalid in OpenCL}}
#endif
}