aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Driver/default-includes.cl
blob: 5b96052a54cf1d08383dfe91274b6ced8876c420 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// 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{{use of undeclared identifier 'get_global_id'}}
#endif
}