瀏覽代碼

[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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@366421 91177308-0d34-0410-b5e6-96231b3b80d8
Anastasia Stulova 6 年之前
父節點
當前提交
c0abfaad68

+ 4 - 4
include/clang/Basic/DiagnosticCommonKinds.td

@@ -132,8 +132,8 @@ def err_nullability_conflicting : Error<
 
 
 // OpenCL Section 6.8.g
 // OpenCL Section 6.8.g
 def err_opencl_unknown_type_specifier : Error<
 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<
 def warn_unknown_attribute_ignored : Warning<
   "unknown attribute %0 ignored">, InGroup<UnknownAttributes>;
   "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 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">;
 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<
 def err_openclcxx_not_supported : Error<
-  "'%0' is not supported in OpenCL C++">;
+  "'%0' is not supported in C++ for OpenCL">;
 
 
 // OpenMP
 // OpenMP
 def err_omp_more_one_clause : Error<
 def err_omp_more_one_clause : Error<

+ 2 - 2
include/clang/Basic/DiagnosticParseKinds.td

@@ -1154,9 +1154,9 @@ def err_opencl_taking_function_address_parser : Error<
 def err_opencl_logical_exclusive_or : Error<
 def err_opencl_logical_exclusive_or : Error<
   "^^ is a reserved operator in OpenCL">;
   "^^ is a reserved operator in OpenCL">;
 
 
-// OpenCL C++.
+// C++ for OpenCL.
 def err_openclcxx_virtual_function : Error<
 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.
 // OpenMP support.
 def warn_pragma_omp_ignored : Warning<
 def warn_pragma_omp_ignored : Warning<

+ 2 - 2
include/clang/Basic/LangOptions.def

@@ -197,8 +197,8 @@ LANGOPT(ShortEnums        , 1, 0, "short enum types")
 
 
 LANGOPT(OpenCL            , 1, 0, "OpenCL")
 LANGOPT(OpenCL            , 1, 0, "OpenCL")
 LANGOPT(OpenCLVersion     , 32, 0, "OpenCL C version")
 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(NativeHalfType    , 1, 0, "Native half type support")
 LANGOPT(NativeHalfArgsAndReturns, 1, 0, "Native half args and returns")
 LANGOPT(NativeHalfArgsAndReturns, 1, 0, "Native half args and returns")
 LANGOPT(HalfArgsAndReturns, 1, 0, "half args and returns")
 LANGOPT(HalfArgsAndReturns, 1, 0, "half args and returns")

+ 2 - 3
include/clang/Basic/TokenKinds.def

@@ -252,9 +252,8 @@ PUNCTUATOR(caretcaret,            "^^")
 //   KEYNOMS18 - This is a keyword that must never be enabled under
 //   KEYNOMS18 - This is a keyword that must never be enabled under
 //               MSVC <= v18.
 //               MSVC <= v18.
 //   KEYOPENCLC   - This is a keyword in OpenCL C
 //   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
 //   KEYALTIVEC - This is a keyword in AltiVec
 //   KEYZVECTOR - This is a keyword for the System z vector extensions,
 //   KEYZVECTOR - This is a keyword for the System z vector extensions,
 //                which are heavily based on AltiVec
 //                which are heavily based on AltiVec

+ 1 - 1
include/clang/Frontend/LangStandards.def

@@ -166,7 +166,7 @@ LANGSTANDARD(opencl20, "cl2.0",
              OpenCL, "OpenCL 2.0",
              OpenCL, "OpenCL 2.0",
              LineComment | C99 | Digraphs | HexFloat | OpenCL)
              LineComment | C99 | Digraphs | HexFloat | OpenCL)
 LANGSTANDARD(openclcpp, "c++",
 LANGSTANDARD(openclcpp, "c++",
-             OpenCL, "OpenCL C++ 1.0",
+             OpenCL, "C++ for OpenCL",
              LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 |
              LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 |
              Digraphs | HexFloat | OpenCL)
              Digraphs | HexFloat | OpenCL)
 
 

+ 1 - 1
lib/Frontend/InitPreprocessor.cpp

@@ -411,7 +411,7 @@ static void InitializeStandardPredefinedMacros(const TargetInfo &TI,
       if (LangOpts.OpenCLCPlusPlusVersion == 100)
       if (LangOpts.OpenCLCPlusPlusVersion == 100)
         Builder.defineMacro("__OPENCL_CPP_VERSION__", "100");
         Builder.defineMacro("__OPENCL_CPP_VERSION__", "100");
       else
       else
-        llvm_unreachable("Unsupported OpenCL C++ version");
+        llvm_unreachable("Unsupported C++ version for OpenCL");
       Builder.defineMacro("__CL_CPP_VERSION_1_0__", "100");
       Builder.defineMacro("__CL_CPP_VERSION_1_0__", "100");
     } else {
     } else {
       // OpenCL v1.0 and v1.1 do not have a predefined macro to indicate the
       // OpenCL v1.0 and v1.1 do not have a predefined macro to indicate the

+ 2 - 1
lib/Parse/ParseDecl.cpp

@@ -3559,7 +3559,8 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
       isInvalid = DS.setFunctionSpecInline(Loc, PrevSpec, DiagID);
       isInvalid = DS.setFunctionSpecInline(Loc, PrevSpec, DiagID);
       break;
       break;
     case tok::kw_virtual:
     case tok::kw_virtual:
-      // OpenCL C++ v1.0 s2.9: the virtual function qualifier is not supported.
+      // C++ for OpenCL does not allow virtual function qualifier, to avoid
+      // function pointers restricted in OpenCL v2.0 s6.9.a.
       if (getLangOpts().OpenCLCPlusPlus) {
       if (getLangOpts().OpenCLCPlusPlus) {
         DiagID = diag::err_openclcxx_virtual_function;
         DiagID = diag::err_openclcxx_virtual_function;
         PrevSpec = Tok.getIdentifierInfo()->getNameStart();
         PrevSpec = Tok.getIdentifierInfo()->getNameStart();

+ 0 - 1
lib/Sema/DeclSpec.cpp

@@ -596,7 +596,6 @@ bool DeclSpec::SetStorageClassSpec(Sema &S, SCS SC, SourceLocation Loc,
   // these storage-class specifiers.
   // these storage-class specifiers.
   // OpenCL v1.2 s6.8 changes this to "The auto and register storage-class
   // OpenCL v1.2 s6.8 changes this to "The auto and register storage-class
   // specifiers are not supported."
   // specifiers are not supported."
-  // OpenCL C++ v1.0 s2.9 restricts register.
   if (S.getLangOpts().OpenCL &&
   if (S.getLangOpts().OpenCL &&
       !S.getOpenCLOptions().isEnabled("cl_clang_storage_class_specifiers")) {
       !S.getOpenCLOptions().isEnabled("cl_clang_storage_class_specifiers")) {
     switch (SC) {
     switch (SC) {

+ 1 - 1
lib/Sema/SemaCast.cpp

@@ -285,7 +285,7 @@ Sema::BuildCXXNamedCast(SourceLocation OpLoc, tok::TokenKind Kind,
                                                 AngleBrackets));
                                                 AngleBrackets));
 
 
   case tok::kw_dynamic_cast: {
   case tok::kw_dynamic_cast: {
-    // OpenCL C++ 1.0 s2.9: dynamic_cast is not supported.
+    // dynamic_cast is not supported in C++ for OpenCL.
     if (getLangOpts().OpenCLCPlusPlus) {
     if (getLangOpts().OpenCLCPlusPlus) {
       return ExprError(Diag(OpLoc, diag::err_openclcxx_not_supported)
       return ExprError(Diag(OpLoc, diag::err_openclcxx_not_supported)
                        << "dynamic_cast");
                        << "dynamic_cast");

+ 5 - 6
lib/Sema/SemaDecl.cpp

@@ -6428,8 +6428,8 @@ NamedDecl *Sema::ActOnVariableDeclarator(
       }
       }
     }
     }
 
 
-    // OpenCL C++ 1.0 s2.9: the thread_local storage qualifier is not
-    // supported.  OpenCL C does not support thread_local either, and
+    // C++ for OpenCL does not allow the thread_local storage qualifier.
+    // OpenCL C does not support thread_local either, and
     // also reject all other thread storage class specifiers.
     // also reject all other thread storage class specifiers.
     DeclSpec::TSCS TSC = D.getDeclSpec().getThreadStorageClassSpec();
     DeclSpec::TSCS TSC = D.getDeclSpec().getThreadStorageClassSpec();
     if (TSC != TSCS_unspecified) {
     if (TSC != TSCS_unspecified) {
@@ -7435,9 +7435,8 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {
     // OpenCL C v2.0 s6.5.1 - Variables defined at program scope and static
     // OpenCL C v2.0 s6.5.1 - Variables defined at program scope and static
     // variables inside a function can also be declared in the global
     // variables inside a function can also be declared in the global
     // address space.
     // address space.
-    // OpenCL C++ v1.0 s2.5 inherits rule from OpenCL C v2.0 and allows local
-    // address space additionally.
-    // FIXME: Add local AS for OpenCL C++.
+    // C++ for OpenCL inherits rule from OpenCL C v2.0.
+    // FIXME: Adding local AS in C++ for OpenCL might make sense.
     if (NewVD->isFileVarDecl() || NewVD->isStaticLocal() ||
     if (NewVD->isFileVarDecl() || NewVD->isStaticLocal() ||
         NewVD->hasExternalStorage()) {
         NewVD->hasExternalStorage()) {
       if (!T->isSamplerT() &&
       if (!T->isSamplerT() &&
@@ -11590,7 +11589,7 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {
       // do nothing
       // do nothing
 
 
     // OpenCL v1.2 s6.5.3: __constant locals must be constant-initialized.
     // OpenCL v1.2 s6.5.3: __constant locals must be constant-initialized.
-    // This is true even in OpenCL C++.
+    // This is true even in C++ for OpenCL.
     } else if (VDecl->getType().getAddressSpace() == LangAS::opencl_constant) {
     } else if (VDecl->getType().getAddressSpace() == LangAS::opencl_constant) {
       CheckForConstantInitializer(Init, DclT);
       CheckForConstantInitializer(Init, DclT);
 
 

+ 2 - 2
lib/Sema/SemaDeclCXX.cpp

@@ -13272,7 +13272,7 @@ CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl,
                         diag::err_operator_new_delete_dependent_result_type)
                         diag::err_operator_new_delete_dependent_result_type)
     << FnDecl->getDeclName() << ExpectedResultType;
     << FnDecl->getDeclName() << ExpectedResultType;
 
 
-  // OpenCL C++: the operator is valid on any address space.
+  // The operator is valid on any address space for OpenCL.
   if (SemaRef.getLangOpts().OpenCLCPlusPlus) {
   if (SemaRef.getLangOpts().OpenCLCPlusPlus) {
     if (auto *PtrTy = ResultType->getAs<PointerType>()) {
     if (auto *PtrTy = ResultType->getAs<PointerType>()) {
       ResultType = RemoveAddressSpaceFromPtr(SemaRef, PtrTy);
       ResultType = RemoveAddressSpaceFromPtr(SemaRef, PtrTy);
@@ -13305,7 +13305,7 @@ CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl,
 
 
   // Check that the first parameter type is what we expect.
   // Check that the first parameter type is what we expect.
   if (SemaRef.getLangOpts().OpenCLCPlusPlus) {
   if (SemaRef.getLangOpts().OpenCLCPlusPlus) {
-    // OpenCL C++: the operator is valid on any address space.
+    // The operator is valid on any address space for OpenCL.
     if (auto *PtrTy =
     if (auto *PtrTy =
             FnDecl->getParamDecl(0)->getType()->getAs<PointerType>()) {
             FnDecl->getParamDecl(0)->getType()->getAs<PointerType>()) {
       FirstParamType = RemoveAddressSpaceFromPtr(SemaRef, PtrTy);
       FirstParamType = RemoveAddressSpaceFromPtr(SemaRef, PtrTy);

+ 3 - 3
lib/Sema/SemaExprCXX.cpp

@@ -529,7 +529,7 @@ ExprResult Sema::BuildCXXTypeId(QualType TypeInfoType,
 ExprResult
 ExprResult
 Sema::ActOnCXXTypeid(SourceLocation OpLoc, SourceLocation LParenLoc,
 Sema::ActOnCXXTypeid(SourceLocation OpLoc, SourceLocation LParenLoc,
                      bool isType, void *TyOrExpr, SourceLocation RParenLoc) {
                      bool isType, void *TyOrExpr, SourceLocation RParenLoc) {
-  // OpenCL C++ 1.0 s2.9: typeid is not supported.
+  // typeid is not supported in OpenCL.
   if (getLangOpts().OpenCLCPlusPlus) {
   if (getLangOpts().OpenCLCPlusPlus) {
     return ExprError(Diag(OpLoc, diag::err_openclcxx_not_supported)
     return ExprError(Diag(OpLoc, diag::err_openclcxx_not_supported)
                      << "typeid");
                      << "typeid");
@@ -2656,8 +2656,8 @@ void Sema::DeclareGlobalNewDelete() {
   if (GlobalNewDeleteDeclared)
   if (GlobalNewDeleteDeclared)
     return;
     return;
 
 
-  // OpenCL C++ 1.0 s2.9: the implicitly declared new and delete operators
-  // are not supported.
+  // The implicitly declared new and delete operators
+  // are not supported in OpenCL.
   if (getLangOpts().OpenCLCPlusPlus)
   if (getLangOpts().OpenCLCPlusPlus)
     return;
     return;
 
 

+ 1 - 1
test/Driver/unknown-std.cl

@@ -10,7 +10,7 @@
 // CHECK-NEXT: note: use 'cl1.1' for 'OpenCL 1.1' standard
 // CHECK-NEXT: note: use 'cl1.1' for 'OpenCL 1.1' standard
 // CHECK-NEXT: note: use 'cl1.2' for 'OpenCL 1.2' standard
 // CHECK-NEXT: note: use 'cl1.2' for 'OpenCL 1.2' standard
 // CHECK-NEXT: note: use 'cl2.0' for 'OpenCL 2.0' standard
 // CHECK-NEXT: note: use 'cl2.0' for 'OpenCL 2.0' standard
-// CHECK-NEXT: note: use 'c++' for 'OpenCL C++ 1.0' standard
+// CHECK-NEXT: note: use 'c++' for 'C++ for OpenCL' standard
 
 
 // Make sure that no other output is present.
 // Make sure that no other output is present.
 // CHECK-NOT: {{^.+$}}
 // CHECK-NOT: {{^.+$}}

+ 1 - 1
test/Parser/opencl-cxx-keywords.cl

@@ -2,7 +2,7 @@
 // RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=c++ -verify -fsyntax-only -fexceptions -fcxx-exceptions
 // RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=c++ -verify -fsyntax-only -fexceptions -fcxx-exceptions
 
 
 // This test checks that various C++ and OpenCL C keywords are not available
 // This test checks that various C++ and OpenCL C keywords are not available
-// in OpenCL C++, according to OpenCL C++ 1.0 Specification Section 2.9.
+// in OpenCL.
 
 
 // Test that exceptions are disabled despite passing -fcxx-exceptions.
 // Test that exceptions are disabled despite passing -fcxx-exceptions.
 kernel void test_exceptions() {
 kernel void test_exceptions() {

+ 3 - 3
test/Parser/opencl-cxx-virtual.cl

@@ -3,17 +3,17 @@
 // Test that virtual functions and abstract classes are rejected.
 // Test that virtual functions and abstract classes are rejected.
 class virtual_functions {
 class virtual_functions {
   virtual void bad1() {}
   virtual void bad1() {}
-  //expected-error@-1 {{virtual functions are not supported in OpenCL C++}}
+  //expected-error@-1 {{virtual functions are not supported in C++ for OpenCL}}
 
 
   virtual void bad2() = 0;
   virtual void bad2() = 0;
-  //expected-error@-1 {{virtual functions are not supported in OpenCL C++}}
+  //expected-error@-1 {{virtual functions are not supported in C++ for OpenCL}}
   //expected-error@-2 {{'bad2' is not virtual and cannot be declared pure}}
   //expected-error@-2 {{'bad2' is not virtual and cannot be declared pure}}
 };
 };
 
 
 template <typename T>
 template <typename T>
 class X {
 class X {
   virtual T f();
   virtual T f();
-  //expected-error@-1 {{virtual functions are not supported in OpenCL C++}}
+  //expected-error@-1 {{virtual functions are not supported in C++ for OpenCL}}
 };
 };
 
 
 // Test that virtual base classes are allowed.
 // Test that virtual base classes are allowed.

+ 4 - 4
test/SemaOpenCLCXX/newdelete.cl

@@ -19,8 +19,8 @@ class B {
 // There are no global user-defined new operators at this point. Test that clang
 // There are no global user-defined new operators at this point. Test that clang
 // rejects these gracefully.
 // rejects these gracefully.
 void test_default_new_delete(void *buffer, A **pa) {
 void test_default_new_delete(void *buffer, A **pa) {
-  A *a = new A;         // expected-error {{'default new' is not supported in OpenCL C++}}
-  delete a;             // expected-error {{'default delete' is not supported in OpenCL C++}}
+  A *a = new A;         // expected-error {{'default new' is not supported in C++ for OpenCL}}
+  delete a;             // expected-error {{'default delete' is not supported in C++ for OpenCL}}
   *pa = new (buffer) A; // expected-error {{use of placement new requires explicit declaration}}
   *pa = new (buffer) A; // expected-error {{use of placement new requires explicit declaration}}
 }
 }
 
 
@@ -36,10 +36,10 @@ void *operator new[](size_t _s, void *ptr) noexcept {
 
 
 void test_new_delete(void *buffer, A **a, B **b) {
 void test_new_delete(void *buffer, A **a, B **b) {
   *a = new A; // expected-error {{no matching function for call to 'operator new'}}
   *a = new A; // expected-error {{no matching function for call to 'operator new'}}
-  delete a;   // expected-error {{'default delete' is not supported in OpenCL C++}}
+  delete a;   // expected-error {{'default delete' is not supported in C++ for OpenCL}}
 
 
   *a = new A[20]; // expected-error {{no matching function for call to 'operator new[]'}}
   *a = new A[20]; // expected-error {{no matching function for call to 'operator new[]'}}
-  delete[] *a;    // expected-error {{'default delete' is not supported in OpenCL C++}}
+  delete[] *a;    // expected-error {{'default delete' is not supported in C++ for OpenCL}}
 
 
   // User-defined placement new is supported.
   // User-defined placement new is supported.
   *a = new (buffer) A;
   *a = new (buffer) A;

+ 9 - 9
test/SemaOpenCLCXX/restricted.cl

@@ -1,9 +1,9 @@
 // RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=c++ -pedantic -verify -fsyntax-only
 // RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=c++ -pedantic -verify -fsyntax-only
 
 
 // This test checks that various C/C++/OpenCL C constructs are not available in
 // This test checks that various C/C++/OpenCL C constructs are not available in
-// OpenCL C++, according to OpenCL C++ 1.0 Specification Section 2.9.
+// C++ for OpenCL.
 
 
-// Test that typeid is not available in OpenCL C++.
+// Test that typeid is not available.
 namespace std {
 namespace std {
   // Provide a dummy std::type_info so that we can use typeid.
   // Provide a dummy std::type_info so that we can use typeid.
   class type_info {
   class type_info {
@@ -11,9 +11,9 @@ namespace std {
   };
   };
 }
 }
 __constant std::type_info int_ti = typeid(int);
 __constant std::type_info int_ti = typeid(int);
-// expected-error@-1 {{'typeid' is not supported in OpenCL C++}}
+// expected-error@-1 {{'typeid' is not supported in C++ for OpenCL}}
 
 
-// Test that dynamic_cast is not available in OpenCL C++.
+// Test that dynamic_cast is not available in C++ for OpenCL.
 class A {
 class A {
 public:
 public:
   int a;
   int a;
@@ -25,17 +25,17 @@ class B : public A {
 
 
 B *test_dynamic_cast(B *p) {
 B *test_dynamic_cast(B *p) {
   return dynamic_cast<B *>(p);
   return dynamic_cast<B *>(p);
-  // expected-error@-1 {{'dynamic_cast' is not supported in OpenCL C++}}
+  // expected-error@-1 {{'dynamic_cast' is not supported in C++ for OpenCL}}
 }
 }
 
 
 // Test storage class qualifiers.
 // Test storage class qualifiers.
 __constant _Thread_local int a = 1;
 __constant _Thread_local int a = 1;
-// expected-error@-1 {{OpenCL C++ version 1.0 does not support the '_Thread_local' storage class specifier}}
+// expected-error@-1 {{C++ for OpenCL version 1.0 does not support the '_Thread_local' storage class specifier}}
 __constant __thread int b = 2;
 __constant __thread int b = 2;
-// expected-error@-1 {{OpenCL C++ version 1.0 does not support the '__thread' storage class specifier}}
+// expected-error@-1 {{C++ for OpenCL version 1.0 does not support the '__thread' storage class specifier}}
 kernel void test_storage_classes() {
 kernel void test_storage_classes() {
   register int x;
   register int x;
-  // expected-error@-1 {{OpenCL C++ version 1.0 does not support the 'register' storage class specifier}}
+  // expected-error@-1 {{C++ for OpenCL version 1.0 does not support the 'register' storage class specifier}}
   thread_local int y;
   thread_local int y;
-  // expected-error@-1 {{OpenCL C++ version 1.0 does not support the 'thread_local' storage class specifier}}
+  // expected-error@-1 {{C++ for OpenCL version 1.0 does not support the 'thread_local' storage class specifier}}
 }
 }