• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -Wno-cuda-compat -Werror %s
2 // RUN: %clang_cc1 -Wcuda-compat -verify %s
3 // RUN: %clang_cc1 -x c++ -Wcuda-compat -Werror %s
4 
5 // Note that this puts the expected lines before the directives to work around
6 // limitations in the -verify mode.
7 
test(int * List,int Length)8 void test(int *List, int Length) {
9 /* expected-warning {{argument to '#pragma unroll' should not be in parentheses in CUDA C/C++}} */#pragma unroll(4)
10   for (int i = 0; i < Length; ++i) {
11     List[i] = i;
12   }
13 }
14