Commit 46b55fa5 authored by Anastasia Stulova's avatar Anastasia Stulova
Browse files

[OpenCL] Update comments/diagnostics to refer to C++ for OpenCL

Clang doesn't implement OpenCL C++, change the comments to
reflect that.

Differential Revision: https://reviews.llvm.org/D64867

llvm-svn: 366421
parent 51cdd518
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -132,8 +132,8 @@ def err_nullability_conflicting : Error<

// OpenCL Section 6.8.g
def err_opencl_unknown_type_specifier : Error<
  "OpenCL %select{C|C++}0 version %1 does not support the '%2' "
  "%select{type qualifier|storage class specifier}3">;
  "%select{OpenCL C|C++ for OpenCL}0 version %1 does not support the "
  "'%2' %select{type qualifier|storage class specifier}3">;

def warn_unknown_attribute_ignored : Warning<
  "unknown attribute %0 ignored">, InGroup<UnknownAttributes>;
@@ -291,9 +291,9 @@ def note_mt_message : Note<"[rewriter] %0">;
def warn_arcmt_nsalloc_realloc : Warning<"[rewriter] call returns pointer to GC managed memory; it will become unmanaged in ARC">;
def err_arcmt_nsinvocation_ownership : Error<"NSInvocation's %0 is not safe to be used with an object with ownership other than __unsafe_unretained">;

// OpenCL C++.
// C++ for OpenCL.
def err_openclcxx_not_supported : Error<
  "'%0' is not supported in OpenCL C++">;
  "'%0' is not supported in C++ for OpenCL">;

// OpenMP
def err_omp_more_one_clause : Error<
+2 −2
Original line number Diff line number Diff line
@@ -1154,9 +1154,9 @@ def err_opencl_taking_function_address_parser : Error<
def err_opencl_logical_exclusive_or : Error<
  "^^ is a reserved operator in OpenCL">;

// OpenCL C++.
// C++ for OpenCL.
def err_openclcxx_virtual_function : Error<
  "virtual functions are not supported in OpenCL C++">;
  "virtual functions are not supported in C++ for OpenCL">;

// OpenMP support.
def warn_pragma_omp_ignored : Warning<
+2 −2
Original line number Diff line number Diff line
@@ -197,8 +197,8 @@ LANGOPT(ShortEnums , 1, 0, "short enum types")

LANGOPT(OpenCL            , 1, 0, "OpenCL")
LANGOPT(OpenCLVersion     , 32, 0, "OpenCL C version")
LANGOPT(OpenCLCPlusPlus   , 1, 0, "OpenCL C++")
LANGOPT(OpenCLCPlusPlusVersion     , 32, 0, "OpenCL C++ version")
LANGOPT(OpenCLCPlusPlus   , 1, 0, "C++ for OpenCL")
LANGOPT(OpenCLCPlusPlusVersion     , 32, 0, "C++ for OpenCL version")
LANGOPT(NativeHalfType    , 1, 0, "Native half type support")
LANGOPT(NativeHalfArgsAndReturns, 1, 0, "Native half args and returns")
LANGOPT(HalfArgsAndReturns, 1, 0, "half args and returns")
+2 −3
Original line number Diff line number Diff line
@@ -252,9 +252,8 @@ PUNCTUATOR(caretcaret, "^^")
//   KEYNOMS18 - This is a keyword that must never be enabled under
//               MSVC <= v18.
//   KEYOPENCLC   - This is a keyword in OpenCL C
//   KEYOPENCLCXX - This is a keyword in OpenCL C++
//   KEYNOOPENCL  - This is a keyword that is not supported in OpenCL C
//                  nor in OpenCL C++.
//   KEYOPENCLCXX - This is a keyword in C++ for OpenCL
//   KEYNOOPENCL  - This is a keyword that is not supported in OpenCL
//   KEYALTIVEC - This is a keyword in AltiVec
//   KEYZVECTOR - This is a keyword for the System z vector extensions,
//                which are heavily based on AltiVec
+1 −1
Original line number Diff line number Diff line
@@ -166,7 +166,7 @@ LANGSTANDARD(opencl20, "cl2.0",
             OpenCL, "OpenCL 2.0",
             LineComment | C99 | Digraphs | HexFloat | OpenCL)
LANGSTANDARD(openclcpp, "c++",
             OpenCL, "OpenCL C++ 1.0",
             OpenCL, "C++ for OpenCL",
             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 |
             Digraphs | HexFloat | OpenCL)

Loading