llvm-for-llvmta/tools/clang/test/SemaOpenCL/invalid-assignment-constant...

8 lines
165 B
Common Lisp
Raw Permalink Normal View History

2022-04-25 13:02:35 +02:00
// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only
int constant c[3] = {0};
void foo() {
c[0] = 1; //expected-error{{read-only variable is not assignable}}
}