This patch adds the reserved operator ^^ when compiling for OpenCL (spec v1.1 s6.3.g), which results in a more meaningful error message. Patch by Neil Hickey! Review: http://reviews.llvm.org/D13280 M test/SemaOpenCL/unsupported.cl M include/clang/Basic/TokenKinds.def M include/clang/Basic/DiagnosticParseKinds.td M lib/Basic/OperatorPrecedence.cpp M lib/Lex/Lexer.cpp M lib/Parse/ParseExpr.cpp llvm-svn: 259651
14 lines
333 B
Common Lisp
14 lines
333 B
Common Lisp
// RUN: %clang_cc1 -verify %s
|
|
|
|
struct {
|
|
int a : 1; // expected-error {{bitfields are not supported in OpenCL}}
|
|
};
|
|
|
|
void no_vla(int n) {
|
|
int a[n]; // expected-error {{variable length arrays are not supported in OpenCL}}
|
|
}
|
|
|
|
void no_logxor(int n) {
|
|
int logxor = n ^^ n; // expected-error {{^^ is a reserved operator in OpenCL}}
|
|
}
|