[clang] d1c8a15 - [OpenCL] Added distinct file extension for C++ for OpenCL.

Anastasia Stulova via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 24 06:07:36 PDT 2021


Author: Anastasia Stulova
Date: 2021-03-24T13:07:04Z
New Revision: d1c8a151df830c6c727f0bb7d33774bd3eb96824

URL: https://github.com/llvm/llvm-project/commit/d1c8a151df830c6c727f0bb7d33774bd3eb96824
DIFF: https://github.com/llvm/llvm-project/commit/d1c8a151df830c6c727f0bb7d33774bd3eb96824.diff

LOG: [OpenCL] Added distinct file extension for C++ for OpenCL.

Files compiled with C++ for OpenCL mode can now have a distinct
file extension - clcpp, then clang driver picks the compilation
mode automatically (-x clcpp) without the use of -cl-std=clc++.

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

Added: 
    clang/test/CodeGenOpenCLCXX/address-space-deduction.clcpp
    clang/test/CodeGenOpenCLCXX/address-space-deduction2.clcpp
    clang/test/CodeGenOpenCLCXX/addrspace-conversion.clcpp
    clang/test/CodeGenOpenCLCXX/addrspace-derived-base.clcpp
    clang/test/CodeGenOpenCLCXX/addrspace-new-delete.clcpp
    clang/test/CodeGenOpenCLCXX/addrspace-of-this.clcpp
    clang/test/CodeGenOpenCLCXX/addrspace-operators.clcpp
    clang/test/CodeGenOpenCLCXX/addrspace-references.clcpp
    clang/test/CodeGenOpenCLCXX/addrspace-with-class.clcpp
    clang/test/CodeGenOpenCLCXX/addrspace_cast.clcpp
    clang/test/CodeGenOpenCLCXX/atexit.clcpp
    clang/test/CodeGenOpenCLCXX/constexpr.clcpp
    clang/test/CodeGenOpenCLCXX/global_init.clcpp
    clang/test/CodeGenOpenCLCXX/local_addrspace_init.clcpp
    clang/test/CodeGenOpenCLCXX/method-overload-address-space.clcpp
    clang/test/CodeGenOpenCLCXX/template-address-spaces.clcpp
    clang/test/Driver/cxx_for_opencl.clcpp
    clang/test/SemaOpenCLCXX/address-space-castoperators.clcpp
    clang/test/SemaOpenCLCXX/address-space-cond.clcpp
    clang/test/SemaOpenCLCXX/address-space-deduction.clcpp
    clang/test/SemaOpenCLCXX/address-space-lambda.clcpp
    clang/test/SemaOpenCLCXX/address-space-of-this-class-scope.clcpp
    clang/test/SemaOpenCLCXX/address-space-of-this.clcpp
    clang/test/SemaOpenCLCXX/address-space-references.clcpp
    clang/test/SemaOpenCLCXX/address-space-templates.clcpp
    clang/test/SemaOpenCLCXX/address_space_overloading.clcpp
    clang/test/SemaOpenCLCXX/addrspace-auto.clcpp
    clang/test/SemaOpenCLCXX/addrspace_cast.clcpp
    clang/test/SemaOpenCLCXX/addrspace_cast_ast_dump.clcpp
    clang/test/SemaOpenCLCXX/invalid-kernel.clcpp
    clang/test/SemaOpenCLCXX/members.clcpp
    clang/test/SemaOpenCLCXX/method-overload-address-space.clcpp
    clang/test/SemaOpenCLCXX/newdelete.clcpp
    clang/test/SemaOpenCLCXX/references.clcpp
    clang/test/SemaOpenCLCXX/restricted.clcpp

Modified: 
    clang/include/clang/Basic/LangStandard.h
    clang/include/clang/Driver/Types.def
    clang/lib/Driver/Types.cpp
    clang/lib/Frontend/CompilerInvocation.cpp
    clang/lib/Frontend/FrontendActions.cpp
    clang/lib/Frontend/FrontendOptions.cpp
    clang/test/Driver/lit.local.cfg
    clang/test/lit.cfg.py

Removed: 
    clang/test/CodeGenOpenCLCXX/address-space-deduction.cl
    clang/test/CodeGenOpenCLCXX/address-space-deduction2.cl
    clang/test/CodeGenOpenCLCXX/addrspace-conversion.cl
    clang/test/CodeGenOpenCLCXX/addrspace-derived-base.cl
    clang/test/CodeGenOpenCLCXX/addrspace-new-delete.cl
    clang/test/CodeGenOpenCLCXX/addrspace-of-this.cl
    clang/test/CodeGenOpenCLCXX/addrspace-operators.cl
    clang/test/CodeGenOpenCLCXX/addrspace-references.cl
    clang/test/CodeGenOpenCLCXX/addrspace-with-class.cl
    clang/test/CodeGenOpenCLCXX/addrspace_cast.cl
    clang/test/CodeGenOpenCLCXX/atexit.cl
    clang/test/CodeGenOpenCLCXX/constexpr.cl
    clang/test/CodeGenOpenCLCXX/global_init.cl
    clang/test/CodeGenOpenCLCXX/local_addrspace_init.cl
    clang/test/CodeGenOpenCLCXX/method-overload-address-space.cl
    clang/test/CodeGenOpenCLCXX/template-address-spaces.cl
    clang/test/SemaOpenCLCXX/address-space-castoperators.cl
    clang/test/SemaOpenCLCXX/address-space-cond.cl
    clang/test/SemaOpenCLCXX/address-space-deduction.cl
    clang/test/SemaOpenCLCXX/address-space-lambda.cl
    clang/test/SemaOpenCLCXX/address-space-of-this-class-scope.cl
    clang/test/SemaOpenCLCXX/address-space-of-this.cl
    clang/test/SemaOpenCLCXX/address-space-references.cl
    clang/test/SemaOpenCLCXX/address-space-templates.cl
    clang/test/SemaOpenCLCXX/address_space_overloading.cl
    clang/test/SemaOpenCLCXX/addrspace-auto.cl
    clang/test/SemaOpenCLCXX/addrspace_cast.cl
    clang/test/SemaOpenCLCXX/addrspace_cast_ast_dump.cl
    clang/test/SemaOpenCLCXX/invalid-kernel.cl
    clang/test/SemaOpenCLCXX/members.cl
    clang/test/SemaOpenCLCXX/method-overload-address-space.cl
    clang/test/SemaOpenCLCXX/newdelete.cl
    clang/test/SemaOpenCLCXX/references.cl
    clang/test/SemaOpenCLCXX/restricted.cl


################################################################################
diff  --git a/clang/include/clang/Basic/LangStandard.h b/clang/include/clang/Basic/LangStandard.h
index f82ce05a63692..b0785409628c4 100644
--- a/clang/include/clang/Basic/LangStandard.h
+++ b/clang/include/clang/Basic/LangStandard.h
@@ -32,6 +32,7 @@ enum class Language : uint8_t {
   ObjC,
   ObjCXX,
   OpenCL,
+  OpenCLCXX,
   CUDA,
   RenderScript,
   HIP,

diff  --git a/clang/include/clang/Driver/Types.def b/clang/include/clang/Driver/Types.def
index 79e8d109cd97e..997eea445c225 100644
--- a/clang/include/clang/Driver/Types.def
+++ b/clang/include/clang/Driver/Types.def
@@ -38,6 +38,7 @@
 TYPE("cpp-output",               PP_C,         INVALID,         "i",      phases::Compile, phases::Backend, phases::Assemble, phases::Link)
 TYPE("c",                        C,            PP_C,            "c",      phases::Preprocess, phases::Compile, phases::Backend, phases::Assemble, phases::Link)
 TYPE("cl",                       CL,           PP_C,            "cl",     phases::Preprocess, phases::Compile, phases::Backend, phases::Assemble, phases::Link)
+TYPE("clcpp",                    CLCXX,        PP_CXX,          "clcpp",  phases::Preprocess, phases::Compile, phases::Backend, phases::Assemble, phases::Link)
 TYPE("cuda-cpp-output",          PP_CUDA,      INVALID,         "cui",    phases::Compile, phases::Backend, phases::Assemble, phases::Link)
 TYPE("cuda",                     CUDA,         PP_CUDA,         "cu",     phases::Preprocess, phases::Compile, phases::Backend, phases::Assemble, phases::Link)
 TYPE("cuda",                     CUDA_DEVICE,  PP_CUDA,         "cu",     phases::Preprocess, phases::Compile, phases::Backend, phases::Assemble, phases::Link)

diff  --git a/clang/lib/Driver/Types.cpp b/clang/lib/Driver/Types.cpp
index 9bdebe2dd761e..b7ccdf23cbaaf 100644
--- a/clang/lib/Driver/Types.cpp
+++ b/clang/lib/Driver/Types.cpp
@@ -126,7 +126,7 @@ bool types::isAcceptedByClang(ID Id) {
 
   case TY_Asm:
   case TY_C: case TY_PP_C:
-  case TY_CL:
+  case TY_CL: case TY_CLCXX:
   case TY_CUDA: case TY_PP_CUDA:
   case TY_CUDA_DEVICE:
   case TY_HIP:
@@ -160,7 +160,7 @@ bool types::isObjC(ID Id) {
   }
 }
 
-bool types::isOpenCL(ID Id) { return Id == TY_CL; }
+bool types::isOpenCL(ID Id) { return Id == TY_CL || Id == TY_CLCXX; }
 
 bool types::isCXX(ID Id) {
   switch (Id) {
@@ -249,6 +249,7 @@ types::ID types::lookupTypeForExtension(llvm::StringRef Ext) {
            .Case("cc", TY_CXX)
            .Case("CC", TY_CXX)
            .Case("cl", TY_CL)
+           .Case("clcpp", TY_CLCXX)
            .Case("cp", TY_CXX)
            .Case("cu", TY_CUDA)
            .Case("hh", TY_CXXHeader)
@@ -396,6 +397,7 @@ ID types::lookupHeaderTypeForSourceType(ID Id) {
   case types::TY_ObjCXX:
     return types::TY_ObjCXXHeader;
   case types::TY_CL:
+  case types::TY_CLCXX:
     return types::TY_CLHeader;
   }
 }

diff  --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index ffaf368d116ae..56aa4b41d58d2 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -520,7 +520,9 @@ static bool FixupInvocation(CompilerInvocation &Invocation,
 static unsigned getOptimizationLevel(ArgList &Args, InputKind IK,
                                      DiagnosticsEngine &Diags) {
   unsigned DefaultOpt = llvm::CodeGenOpt::None;
-  if (IK.getLanguage() == Language::OpenCL && !Args.hasArg(OPT_cl_opt_disable))
+  if ((IK.getLanguage() == Language::OpenCL ||
+       IK.getLanguage() == Language::OpenCLCXX) &&
+      !Args.hasArg(OPT_cl_opt_disable))
     DefaultOpt = llvm::CodeGenOpt::Default;
 
   if (Arg *A = Args.getLastArg(options::OPT_O_Group)) {
@@ -2510,6 +2512,9 @@ static void GenerateFrontendArgs(const FrontendOptions &Opts,
     case Language::OpenCL:
       Lang = "cl";
       break;
+    case Language::OpenCLCXX:
+      Lang = "clcpp";
+      break;
     case Language::CUDA:
       Lang = "cuda";
       break;
@@ -2698,6 +2703,7 @@ static bool ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
     DashX = llvm::StringSwitch<InputKind>(XValue)
                 .Case("c", Language::C)
                 .Case("cl", Language::OpenCL)
+                .Case("clcpp", Language::OpenCLCXX)
                 .Case("cuda", Language::CUDA)
                 .Case("hip", Language::HIP)
                 .Case("c++", Language::CXX)
@@ -3063,6 +3069,9 @@ void CompilerInvocation::setLangDefaults(LangOptions &Opts, InputKind IK,
     case Language::OpenCL:
       LangStd = LangStandard::lang_opencl10;
       break;
+    case Language::OpenCLCXX:
+      LangStd = LangStandard::lang_openclcpp;
+      break;
     case Language::CUDA:
       LangStd = LangStandard::lang_cuda;
       break;
@@ -3198,7 +3207,11 @@ static bool IsInputCompatibleWithStandard(InputKind IK,
     return S.getLanguage() == Language::C;
 
   case Language::OpenCL:
-    return S.getLanguage() == Language::OpenCL;
+    return S.getLanguage() == Language::OpenCL ||
+           S.getLanguage() == Language::OpenCLCXX;
+
+  case Language::OpenCLCXX:
+    return S.getLanguage() == Language::OpenCLCXX;
 
   case Language::CXX:
   case Language::ObjCXX:
@@ -3235,6 +3248,8 @@ static const StringRef GetInputKindName(InputKind IK) {
     return "Objective-C++";
   case Language::OpenCL:
     return "OpenCL";
+  case Language::OpenCLCXX:
+    return "C++ for OpenCL";
   case Language::CUDA:
     return "CUDA";
   case Language::RenderScript:

diff  --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp
index 4e5043b6c75bd..0a84971c748cb 100644
--- a/clang/lib/Frontend/FrontendActions.cpp
+++ b/clang/lib/Frontend/FrontendActions.cpp
@@ -867,6 +867,7 @@ void PrintPreambleAction::ExecuteAction() {
   case Language::ObjC:
   case Language::ObjCXX:
   case Language::OpenCL:
+  case Language::OpenCLCXX:
   case Language::CUDA:
   case Language::HIP:
     break;

diff  --git a/clang/lib/Frontend/FrontendOptions.cpp b/clang/lib/Frontend/FrontendOptions.cpp
index 4ea13cf0784fc..37ac428a80033 100644
--- a/clang/lib/Frontend/FrontendOptions.cpp
+++ b/clang/lib/Frontend/FrontendOptions.cpp
@@ -29,6 +29,7 @@ InputKind FrontendOptions::getInputKindForExtension(StringRef Extension) {
       .Case("cppm", Language::CXX)
       .Case("iim", InputKind(Language::CXX).getPreprocessed())
       .Case("cl", Language::OpenCL)
+      .Case("clcpp", Language::OpenCLCXX)
       .Cases("cu", "cuh", Language::CUDA)
       .Case("hip", Language::HIP)
       .Cases("ll", "bc", Language::LLVM_IR)

diff  --git a/clang/test/CodeGenOpenCLCXX/address-space-deduction.cl b/clang/test/CodeGenOpenCLCXX/address-space-deduction.clcpp
similarity index 86%
rename from clang/test/CodeGenOpenCLCXX/address-space-deduction.cl
rename to clang/test/CodeGenOpenCLCXX/address-space-deduction.clcpp
index c0f30d291c95c..e7c883bb8bcb8 100644
--- a/clang/test/CodeGenOpenCLCXX/address-space-deduction.cl
+++ b/clang/test/CodeGenOpenCLCXX/address-space-deduction.clcpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -O0 -emit-llvm -o - | FileCheck %s -check-prefixes=COMMON,PTR
-// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -O0 -emit-llvm -o - -DREF | FileCheck %s -check-prefixes=COMMON,REF
+// RUN: %clang_cc1 %s -triple spir-unknown-unknown -O0 -emit-llvm -o - | FileCheck %s -check-prefixes=COMMON,PTR
+// RUN: %clang_cc1 %s -triple spir-unknown-unknown -O0 -emit-llvm -o - -DREF | FileCheck %s -check-prefixes=COMMON,REF
 
 #ifdef REF
 #define PTR &

diff  --git a/clang/test/CodeGenOpenCLCXX/address-space-deduction2.cl b/clang/test/CodeGenOpenCLCXX/address-space-deduction2.clcpp
similarity index 77%
rename from clang/test/CodeGenOpenCLCXX/address-space-deduction2.cl
rename to clang/test/CodeGenOpenCLCXX/address-space-deduction2.clcpp
index 36e89499c9548..b454f5a2de98b 100644
--- a/clang/test/CodeGenOpenCLCXX/address-space-deduction2.cl
+++ b/clang/test/CodeGenOpenCLCXX/address-space-deduction2.clcpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -O0 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple spir-unknown-unknown -O0 -emit-llvm -o - | FileCheck %s
 
 class P {
 public:

diff  --git a/clang/test/CodeGenOpenCLCXX/addrspace-conversion.cl b/clang/test/CodeGenOpenCLCXX/addrspace-conversion.clcpp
similarity index 63%
rename from clang/test/CodeGenOpenCLCXX/addrspace-conversion.cl
rename to clang/test/CodeGenOpenCLCXX/addrspace-conversion.clcpp
index a80662f72334e..0608117dd660e 100644
--- a/clang/test/CodeGenOpenCLCXX/addrspace-conversion.cl
+++ b/clang/test/CodeGenOpenCLCXX/addrspace-conversion.clcpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -emit-llvm -O0 -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple spir-unknown-unknown -emit-llvm -O0 -o - | FileCheck %s
 
 void bar(__generic volatile unsigned int* ptr)
 {

diff  --git a/clang/test/CodeGenOpenCLCXX/addrspace-derived-base.cl b/clang/test/CodeGenOpenCLCXX/addrspace-derived-base.clcpp
similarity index 95%
rename from clang/test/CodeGenOpenCLCXX/addrspace-derived-base.cl
rename to clang/test/CodeGenOpenCLCXX/addrspace-derived-base.clcpp
index 954536a944483..6b087e75c4861 100644
--- a/clang/test/CodeGenOpenCLCXX/addrspace-derived-base.cl
+++ b/clang/test/CodeGenOpenCLCXX/addrspace-derived-base.clcpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple spir -cl-std=clc++ -emit-llvm -O0 -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple spir -emit-llvm -O0 -o - | FileCheck %s
 
 struct B {
   int mb;

diff  --git a/clang/test/CodeGenOpenCLCXX/addrspace-new-delete.cl b/clang/test/CodeGenOpenCLCXX/addrspace-new-delete.clcpp
similarity index 80%
rename from clang/test/CodeGenOpenCLCXX/addrspace-new-delete.cl
rename to clang/test/CodeGenOpenCLCXX/addrspace-new-delete.clcpp
index f3a397419def2..a78c0373ed185 100644
--- a/clang/test/CodeGenOpenCLCXX/addrspace-new-delete.cl
+++ b/clang/test/CodeGenOpenCLCXX/addrspace-new-delete.clcpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple spir -cl-std=clc++ -emit-llvm -O0 -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple spir -emit-llvm -O0 -o - | FileCheck %s
 
 typedef __SIZE_TYPE__ size_t;
 

diff  --git a/clang/test/CodeGenOpenCLCXX/addrspace-of-this.cl b/clang/test/CodeGenOpenCLCXX/addrspace-of-this.clcpp
similarity index 95%
rename from clang/test/CodeGenOpenCLCXX/addrspace-of-this.cl
rename to clang/test/CodeGenOpenCLCXX/addrspace-of-this.clcpp
index 764df17d1f51c..50c146bae6ebb 100644
--- a/clang/test/CodeGenOpenCLCXX/addrspace-of-this.cl
+++ b/clang/test/CodeGenOpenCLCXX/addrspace-of-this.clcpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -emit-llvm -pedantic -verify -O0 -o - -DDECL | FileCheck %s --check-prefixes="COMMON,EXPL"
-// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -emit-llvm -pedantic -verify -O0 -o - -DDECL -DUSE_DEFLT | FileCheck %s --check-prefixes="COMMON,IMPL"
-// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -emit-llvm -pedantic -verify -O0 -o - | FileCheck %s --check-prefixes="COMMON,IMPL"
+// RUN: %clang_cc1 %s -triple spir-unknown-unknown -emit-llvm -pedantic -verify -O0 -o - -DDECL | FileCheck %s --check-prefixes="COMMON,EXPL"
+// RUN: %clang_cc1 %s -triple spir-unknown-unknown -emit-llvm -pedantic -verify -O0 -o - -DDECL -DUSE_DEFLT | FileCheck %s --check-prefixes="COMMON,IMPL"
+// RUN: %clang_cc1 %s -triple spir-unknown-unknown -emit-llvm -pedantic -verify -O0 -o - | FileCheck %s --check-prefixes="COMMON,IMPL"
 // expected-no-diagnostics
 
 // Test that the 'this' pointer is in the __generic address space.

diff  --git a/clang/test/CodeGenOpenCLCXX/addrspace-operators.cl b/clang/test/CodeGenOpenCLCXX/addrspace-operators.clcpp
similarity index 97%
rename from clang/test/CodeGenOpenCLCXX/addrspace-operators.cl
rename to clang/test/CodeGenOpenCLCXX/addrspace-operators.clcpp
index cad98c6072fa3..bd3832635d9b1 100644
--- a/clang/test/CodeGenOpenCLCXX/addrspace-operators.cl
+++ b/clang/test/CodeGenOpenCLCXX/addrspace-operators.clcpp
@@ -1,4 +1,4 @@
-//RUN: %clang_cc1 %s -triple spir -cl-std=clc++ -emit-llvm -O0 -o - | FileCheck %s
+//RUN: %clang_cc1 %s -triple spir -emit-llvm -O0 -o - | FileCheck %s
 
 enum E {
   a,

diff  --git a/clang/test/CodeGenOpenCLCXX/addrspace-references.cl b/clang/test/CodeGenOpenCLCXX/addrspace-references.clcpp
similarity index 93%
rename from clang/test/CodeGenOpenCLCXX/addrspace-references.cl
rename to clang/test/CodeGenOpenCLCXX/addrspace-references.clcpp
index 6d4bece1a6240..d8e83450a9e57 100644
--- a/clang/test/CodeGenOpenCLCXX/addrspace-references.cl
+++ b/clang/test/CodeGenOpenCLCXX/addrspace-references.clcpp
@@ -1,4 +1,4 @@
-//RUN: %clang_cc1 %s -cl-std=clc++ -triple spir -emit-llvm -o - -O0 | FileCheck %s
+//RUN: %clang_cc1 %s -triple spir -emit-llvm -o - -O0 | FileCheck %s
 
 typedef short short2 __attribute__((ext_vector_type(2)));
 

diff  --git a/clang/test/CodeGenOpenCLCXX/addrspace-with-class.cl b/clang/test/CodeGenOpenCLCXX/addrspace-with-class.clcpp
similarity index 93%
rename from clang/test/CodeGenOpenCLCXX/addrspace-with-class.cl
rename to clang/test/CodeGenOpenCLCXX/addrspace-with-class.clcpp
index 7cff76a04dff9..c4051f93442e9 100644
--- a/clang/test/CodeGenOpenCLCXX/addrspace-with-class.cl
+++ b/clang/test/CodeGenOpenCLCXX/addrspace-with-class.clcpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -emit-llvm -O0 -o - | FileCheck %s
-// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=CLC++ -emit-llvm -O0 -o - | FileCheck %s --check-prefix=CHECK-DEFINITIONS
+// RUN: %clang_cc1 %s -triple spir-unknown-unknown -emit-llvm -O0 -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple spir-unknown-unknown -emit-llvm -O0 -o - | FileCheck %s --check-prefix=CHECK-DEFINITIONS
 
 // This test ensures the proper address spaces and address space cast are used
 // for constructors, member functions and destructors.

diff  --git a/clang/test/CodeGenOpenCLCXX/addrspace_cast.cl b/clang/test/CodeGenOpenCLCXX/addrspace_cast.clcpp
similarity index 71%
rename from clang/test/CodeGenOpenCLCXX/addrspace_cast.cl
rename to clang/test/CodeGenOpenCLCXX/addrspace_cast.clcpp
index 1ea0fdfb2040f..78656cb32aa7e 100644
--- a/clang/test/CodeGenOpenCLCXX/addrspace_cast.cl
+++ b/clang/test/CodeGenOpenCLCXX/addrspace_cast.clcpp
@@ -1,4 +1,4 @@
-//RUN: %clang_cc1 %s -triple spir -cl-std=clc++ -emit-llvm -O0 -o - | FileCheck %s
+//RUN: %clang_cc1 %s -triple spir -emit-llvm -O0 -o - | FileCheck %s
 
 //CHECK-LABEL: define{{.*}} spir_func void @_Z3barPU3AS1i
 void bar(global int *gl) {

diff  --git a/clang/test/CodeGenOpenCLCXX/atexit.cl b/clang/test/CodeGenOpenCLCXX/atexit.clcpp
similarity index 81%
rename from clang/test/CodeGenOpenCLCXX/atexit.cl
rename to clang/test/CodeGenOpenCLCXX/atexit.clcpp
index 2b28aeaacf45c..e987790348fc4 100644
--- a/clang/test/CodeGenOpenCLCXX/atexit.cl
+++ b/clang/test/CodeGenOpenCLCXX/atexit.clcpp
@@ -1,4 +1,4 @@
-//RUN: %clang_cc1 %s -triple spir -cl-std=clc++ -emit-llvm -O0 -o - | FileCheck %s
+//RUN: %clang_cc1 %s -triple spir -emit-llvm -O0 -o - | FileCheck %s
 
 struct S {
   ~S(){};

diff  --git a/clang/test/CodeGenOpenCLCXX/constexpr.cl b/clang/test/CodeGenOpenCLCXX/constexpr.clcpp
similarity index 94%
rename from clang/test/CodeGenOpenCLCXX/constexpr.cl
rename to clang/test/CodeGenOpenCLCXX/constexpr.clcpp
index 4f2ed7d06f064..7a04d1671274d 100644
--- a/clang/test/CodeGenOpenCLCXX/constexpr.cl
+++ b/clang/test/CodeGenOpenCLCXX/constexpr.clcpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -O0 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple spir-unknown-unknown -O0 -emit-llvm -o - | FileCheck %s
 
 typedef int int2 __attribute__((ext_vector_type(2)));
 typedef int int4 __attribute__((ext_vector_type(4)));

diff  --git a/clang/test/CodeGenOpenCLCXX/global_init.cl b/clang/test/CodeGenOpenCLCXX/global_init.clcpp
similarity index 79%
rename from clang/test/CodeGenOpenCLCXX/global_init.cl
rename to clang/test/CodeGenOpenCLCXX/global_init.clcpp
index 9f602beda5bab..4e02d4accb62f 100644
--- a/clang/test/CodeGenOpenCLCXX/global_init.cl
+++ b/clang/test/CodeGenOpenCLCXX/global_init.clcpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple spir -cl-std=clc++ -emit-llvm -O0 -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple spir -emit-llvm -O0 -o - | FileCheck %s
 
 struct S {
   S() {}

diff  --git a/clang/test/CodeGenOpenCLCXX/local_addrspace_init.cl b/clang/test/CodeGenOpenCLCXX/local_addrspace_init.clcpp
similarity index 89%
rename from clang/test/CodeGenOpenCLCXX/local_addrspace_init.cl
rename to clang/test/CodeGenOpenCLCXX/local_addrspace_init.clcpp
index e892e674ad14b..bb9acf09d120b 100644
--- a/clang/test/CodeGenOpenCLCXX/local_addrspace_init.cl
+++ b/clang/test/CodeGenOpenCLCXX/local_addrspace_init.clcpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple spir -cl-std=clc++ -emit-llvm -O0 -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple spir -emit-llvm -O0 -o - | FileCheck %s
 
 // Test that we don't initialize local address space objects.
 //CHECK: @_ZZ4testE1i = internal addrspace(3) global i32 undef

diff  --git a/clang/test/CodeGenOpenCLCXX/method-overload-address-space.cl b/clang/test/CodeGenOpenCLCXX/method-overload-address-space.clcpp
similarity index 91%
rename from clang/test/CodeGenOpenCLCXX/method-overload-address-space.cl
rename to clang/test/CodeGenOpenCLCXX/method-overload-address-space.clcpp
index b170ead38179c..3cca5c2dc8c51 100644
--- a/clang/test/CodeGenOpenCLCXX/method-overload-address-space.cl
+++ b/clang/test/CodeGenOpenCLCXX/method-overload-address-space.clcpp
@@ -1,4 +1,4 @@
-//RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -emit-llvm -O0 -o - | FileCheck %s
+//RUN: %clang_cc1 %s -triple spir-unknown-unknown -emit-llvm -O0 -o - | FileCheck %s
 
 struct C {
   void foo() __local;

diff  --git a/clang/test/CodeGenOpenCLCXX/template-address-spaces.cl b/clang/test/CodeGenOpenCLCXX/template-address-spaces.clcpp
similarity index 91%
rename from clang/test/CodeGenOpenCLCXX/template-address-spaces.cl
rename to clang/test/CodeGenOpenCLCXX/template-address-spaces.clcpp
index 2142d387d5580..d3814204ed99c 100644
--- a/clang/test/CodeGenOpenCLCXX/template-address-spaces.cl
+++ b/clang/test/CodeGenOpenCLCXX/template-address-spaces.clcpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -cl-std=clc++ %s -emit-llvm -o - -O0 -triple spir-unknown-unknown | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -O0 -triple spir-unknown-unknown | FileCheck %s
 
 template <typename T>
 struct S{

diff  --git a/clang/test/Driver/cxx_for_opencl.clcpp b/clang/test/Driver/cxx_for_opencl.clcpp
new file mode 100644
index 0000000000000..e3e89c53b8886
--- /dev/null
+++ b/clang/test/Driver/cxx_for_opencl.clcpp
@@ -0,0 +1,18 @@
+// RUN: %clang %s -Xclang -verify -fsyntax-only
+// RUN: %clang %s -cl-std=clc++ -Xclang -verify -fsyntax-only
+// RUN: %clang %s -cl-std=cl2.0 -Xclang -verify -fsyntax-only
+// RUN: %clang %s -### 2>&1 | FileCheck %s
+
+// CHECK: "-x" "clcpp"
+
+#ifdef __OPENCL_CPP_VERSION__
+//expected-no-diagnostics
+#endif
+
+kernel void k(){
+  auto a = get_local_id(1);
+#ifndef __OPENCL_CPP_VERSION__
+//expected-error at -2{{OpenCL C version 2.0 does not support the 'auto' storage class specifier}}
+//expected-warning at -3{{type specifier missing, defaults to 'int'}}
+#endif
+}

diff  --git a/clang/test/Driver/lit.local.cfg b/clang/test/Driver/lit.local.cfg
index 7ab6c29ec9482..fe5d67a0f45bf 100644
--- a/clang/test/Driver/lit.local.cfg
+++ b/clang/test/Driver/lit.local.cfg
@@ -1,5 +1,5 @@
 config.suffixes = ['.c', '.cpp', '.h', '.m', '.mm', '.S', '.s', '.f90', '.F90', '.f95',
-                   '.cu', '.rs', '.cl', '.hip']
+                   '.cu', '.rs', '.cl', '.clcpp', '.hip']
 config.substitutions = list(config.substitutions)
 config.substitutions.insert(0,
     ('%clang_cc1',

diff  --git a/clang/test/SemaOpenCLCXX/address-space-castoperators.cl b/clang/test/SemaOpenCLCXX/address-space-castoperators.clcpp
similarity index 93%
rename from clang/test/SemaOpenCLCXX/address-space-castoperators.cl
rename to clang/test/SemaOpenCLCXX/address-space-castoperators.clcpp
index 7fd7f728fda39..f0ec86cb0afc6 100644
--- a/clang/test/SemaOpenCLCXX/address-space-castoperators.cl
+++ b/clang/test/SemaOpenCLCXX/address-space-castoperators.clcpp
@@ -1,4 +1,4 @@
-//RUN: %clang_cc1 %s -cl-std=clc++ -pedantic -ast-dump -verify | FileCheck %s
+//RUN: %clang_cc1 %s -pedantic -ast-dump -verify | FileCheck %s
 
 void nester_ptr() {
   local int * * locgen;

diff  --git a/clang/test/SemaOpenCLCXX/address-space-cond.cl b/clang/test/SemaOpenCLCXX/address-space-cond.clcpp
similarity index 91%
rename from clang/test/SemaOpenCLCXX/address-space-cond.cl
rename to clang/test/SemaOpenCLCXX/address-space-cond.clcpp
index 8090598920009..1b45515b1a150 100644
--- a/clang/test/SemaOpenCLCXX/address-space-cond.cl
+++ b/clang/test/SemaOpenCLCXX/address-space-cond.clcpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -cl-std=clc++ -pedantic -verify
+// RUN: %clang_cc1 %s -pedantic -verify
 
 namespace PointerRvalues {
 

diff  --git a/clang/test/SemaOpenCLCXX/address-space-deduction.cl b/clang/test/SemaOpenCLCXX/address-space-deduction.clcpp
similarity index 97%
rename from clang/test/SemaOpenCLCXX/address-space-deduction.cl
rename to clang/test/SemaOpenCLCXX/address-space-deduction.clcpp
index ddfdb6da4347c..1b757ca436871 100644
--- a/clang/test/SemaOpenCLCXX/address-space-deduction.cl
+++ b/clang/test/SemaOpenCLCXX/address-space-deduction.clcpp
@@ -1,4 +1,4 @@
-//RUN: %clang_cc1 %s -cl-std=clc++ -pedantic -ast-dump -verify | FileCheck %s
+//RUN: %clang_cc1 %s -pedantic -ast-dump -verify | FileCheck %s
 
 //expected-no-diagnostics
 

diff  --git a/clang/test/SemaOpenCLCXX/address-space-lambda.cl b/clang/test/SemaOpenCLCXX/address-space-lambda.clcpp
similarity index 95%
rename from clang/test/SemaOpenCLCXX/address-space-lambda.cl
rename to clang/test/SemaOpenCLCXX/address-space-lambda.clcpp
index 571ea90358776..180624094ee88 100644
--- a/clang/test/SemaOpenCLCXX/address-space-lambda.cl
+++ b/clang/test/SemaOpenCLCXX/address-space-lambda.clcpp
@@ -1,5 +1,5 @@
-//RUN: %clang_cc1 %s -cl-std=clc++ -pedantic -ast-dump -verify | FileCheck %s
-//RUN: %clang_cc1 %s -cl-std=clc++ -pedantic -ast-dump -verify -triple i386-windows | FileCheck %s
+//RUN: %clang_cc1 %s -pedantic -ast-dump -verify | FileCheck %s
+//RUN: %clang_cc1 %s -pedantic -ast-dump -verify -triple i386-windows | FileCheck %s
 
 //CHECK: CXXMethodDecl {{.*}} constexpr operator() 'int (__private int){{.*}} const __generic'
 auto glambda = [](auto a) { return a; };

diff  --git a/clang/test/SemaOpenCLCXX/address-space-of-this-class-scope.cl b/clang/test/SemaOpenCLCXX/address-space-of-this-class-scope.clcpp
similarity index 90%
rename from clang/test/SemaOpenCLCXX/address-space-of-this-class-scope.cl
rename to clang/test/SemaOpenCLCXX/address-space-of-this-class-scope.clcpp
index 86d839d9701b4..55cfef3ceee4b 100644
--- a/clang/test/SemaOpenCLCXX/address-space-of-this-class-scope.cl
+++ b/clang/test/SemaOpenCLCXX/address-space-of-this-class-scope.clcpp
@@ -1,4 +1,4 @@
-//RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -pedantic -verify
+//RUN: %clang_cc1 %s -triple spir-unknown-unknown -pedantic -verify
 
 struct C {
   auto fGlob() __global -> decltype(this);

diff  --git a/clang/test/SemaOpenCLCXX/address-space-of-this.cl b/clang/test/SemaOpenCLCXX/address-space-of-this.clcpp
similarity index 56%
rename from clang/test/SemaOpenCLCXX/address-space-of-this.cl
rename to clang/test/SemaOpenCLCXX/address-space-of-this.clcpp
index ac79b34119284..d77469b197c28 100644
--- a/clang/test/SemaOpenCLCXX/address-space-of-this.cl
+++ b/clang/test/SemaOpenCLCXX/address-space-of-this.clcpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -pedantic -verify -fsyntax-only
+// RUN: %clang_cc1 %s -triple spir-unknown-unknown -pedantic -verify -fsyntax-only
 // expected-no-diagnostics
 
 // Extract from PR38614

diff  --git a/clang/test/SemaOpenCLCXX/address-space-references.cl b/clang/test/SemaOpenCLCXX/address-space-references.clcpp
similarity index 95%
rename from clang/test/SemaOpenCLCXX/address-space-references.cl
rename to clang/test/SemaOpenCLCXX/address-space-references.clcpp
index 05e789a7d4fdd..76426ea65c281 100644
--- a/clang/test/SemaOpenCLCXX/address-space-references.cl
+++ b/clang/test/SemaOpenCLCXX/address-space-references.clcpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -pedantic -verify -fsyntax-only
+// RUN: %clang_cc1 %s -triple spir-unknown-unknown -pedantic -verify -fsyntax-only
 
 __global const int& f(__global float &ref) {
   return ref; // expected-error{{reference of type 'const __global int &' cannot bind to a temporary object because of address space mismatch}}

diff  --git a/clang/test/SemaOpenCLCXX/address-space-templates.cl b/clang/test/SemaOpenCLCXX/address-space-templates.clcpp
similarity index 96%
rename from clang/test/SemaOpenCLCXX/address-space-templates.cl
rename to clang/test/SemaOpenCLCXX/address-space-templates.clcpp
index b7db0e6de3d2d..105a0ddeb35fc 100644
--- a/clang/test/SemaOpenCLCXX/address-space-templates.cl
+++ b/clang/test/SemaOpenCLCXX/address-space-templates.clcpp
@@ -1,4 +1,4 @@
-//RUN: %clang_cc1 %s -cl-std=clc++ -pedantic -verify -ast-dump  | FileCheck %s
+//RUN: %clang_cc1 %s -pedantic -verify -ast-dump  | FileCheck %s
 
 template <typename T>
 struct S {

diff  --git a/clang/test/SemaOpenCLCXX/address_space_overloading.cl b/clang/test/SemaOpenCLCXX/address_space_overloading.clcpp
similarity index 83%
rename from clang/test/SemaOpenCLCXX/address_space_overloading.cl
rename to clang/test/SemaOpenCLCXX/address_space_overloading.clcpp
index 33337ef461df2..01f5010b58bfa 100644
--- a/clang/test/SemaOpenCLCXX/address_space_overloading.cl
+++ b/clang/test/SemaOpenCLCXX/address_space_overloading.clcpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=clc++
+// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only
 // expected-no-diagnostics
 
 struct RetGlob {

diff  --git a/clang/test/SemaOpenCLCXX/addrspace-auto.cl b/clang/test/SemaOpenCLCXX/addrspace-auto.clcpp
similarity index 94%
rename from clang/test/SemaOpenCLCXX/addrspace-auto.cl
rename to clang/test/SemaOpenCLCXX/addrspace-auto.clcpp
index 2860237ddef73..7862564d1b4ef 100644
--- a/clang/test/SemaOpenCLCXX/addrspace-auto.cl
+++ b/clang/test/SemaOpenCLCXX/addrspace-auto.clcpp
@@ -1,4 +1,4 @@
-//RUN: %clang_cc1 %s -cl-std=clc++ -pedantic -ast-dump -verify | FileCheck %s
+//RUN: %clang_cc1 %s -pedantic -ast-dump -verify | FileCheck %s
 
 __constant int i = 1;
 //CHECK: |-VarDecl {{.*}} ai '__global int':'__global int'

diff  --git a/clang/test/SemaOpenCLCXX/addrspace_cast.cl b/clang/test/SemaOpenCLCXX/addrspace_cast.clcpp
similarity index 95%
rename from clang/test/SemaOpenCLCXX/addrspace_cast.cl
rename to clang/test/SemaOpenCLCXX/addrspace_cast.clcpp
index 3bf01757accdc..37cf1bc1d296b 100644
--- a/clang/test/SemaOpenCLCXX/addrspace_cast.cl
+++ b/clang/test/SemaOpenCLCXX/addrspace_cast.clcpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -pedantic -verify -fsyntax-only
+// RUN: %clang_cc1 %s -triple spir-unknown-unknown -pedantic -verify -fsyntax-only
 
 void foo(global int *gl, const global int *gl_const, global int &gl_ref) {
   //FIXME: Diagnostics can be improved to be more specific in some cases.

diff  --git a/clang/test/SemaOpenCLCXX/addrspace_cast_ast_dump.cl b/clang/test/SemaOpenCLCXX/addrspace_cast_ast_dump.clcpp
similarity index 83%
rename from clang/test/SemaOpenCLCXX/addrspace_cast_ast_dump.cl
rename to clang/test/SemaOpenCLCXX/addrspace_cast_ast_dump.clcpp
index cdc3e27857743..87a7f669ea9ea 100644
--- a/clang/test/SemaOpenCLCXX/addrspace_cast_ast_dump.cl
+++ b/clang/test/SemaOpenCLCXX/addrspace_cast_ast_dump.clcpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -pedantic -verify -ast-dump | FileCheck %s
+// RUN: %clang_cc1 %s -triple spir-unknown-unknown -pedantic -verify -ast-dump | FileCheck %s
 
 // expected-no-diagnostics
 

diff  --git a/clang/test/SemaOpenCLCXX/invalid-kernel.cl b/clang/test/SemaOpenCLCXX/invalid-kernel.clcpp
similarity index 89%
rename from clang/test/SemaOpenCLCXX/invalid-kernel.cl
rename to clang/test/SemaOpenCLCXX/invalid-kernel.clcpp
index 2efdb756446dc..2cbfffd5a00e9 100644
--- a/clang/test/SemaOpenCLCXX/invalid-kernel.cl
+++ b/clang/test/SemaOpenCLCXX/invalid-kernel.clcpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -cl-std=clc++ -pedantic -verify -fsyntax-only
+// RUN: %clang_cc1 %s -pedantic -verify -fsyntax-only
 
 struct C {
   kernel void m(); //expected-error{{kernel functions cannot be class members}}

diff  --git a/clang/test/SemaOpenCLCXX/members.cl b/clang/test/SemaOpenCLCXX/members.clcpp
similarity index 76%
rename from clang/test/SemaOpenCLCXX/members.cl
rename to clang/test/SemaOpenCLCXX/members.clcpp
index 855948f0615eb..c0a885cc4bd1d 100644
--- a/clang/test/SemaOpenCLCXX/members.cl
+++ b/clang/test/SemaOpenCLCXX/members.clcpp
@@ -1,5 +1,5 @@
-//RUN: %clang_cc1 %s -triple spir -cl-std=clc++ -verify -fsyntax-only
-//RUN: %clang_cc1 %s -triple spir -cl-std=clc++ -verify -fsyntax-only -DFUNCPTREXT
+//RUN: %clang_cc1 %s -triple spir -verify -fsyntax-only
+//RUN: %clang_cc1 %s -triple spir -verify -fsyntax-only -DFUNCPTREXT
 
 #ifdef FUNCPTREXT
 #pragma OPENCL EXTENSION __cl_clang_function_pointers : enable

diff  --git a/clang/test/SemaOpenCLCXX/method-overload-address-space.cl b/clang/test/SemaOpenCLCXX/method-overload-address-space.clcpp
similarity index 86%
rename from clang/test/SemaOpenCLCXX/method-overload-address-space.cl
rename to clang/test/SemaOpenCLCXX/method-overload-address-space.clcpp
index 7c428a570c2ce..3164901d38cf4 100644
--- a/clang/test/SemaOpenCLCXX/method-overload-address-space.cl
+++ b/clang/test/SemaOpenCLCXX/method-overload-address-space.clcpp
@@ -1,4 +1,4 @@
-//RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -pedantic -verify
+//RUN: %clang_cc1 %s -triple spir-unknown-unknown -pedantic -verify
 
 struct C {
   void m1() __local __local; //expected-warning{{multiple identical address spaces specified for type}}

diff  --git a/clang/test/SemaOpenCLCXX/newdelete.cl b/clang/test/SemaOpenCLCXX/newdelete.clcpp
similarity index 94%
rename from clang/test/SemaOpenCLCXX/newdelete.cl
rename to clang/test/SemaOpenCLCXX/newdelete.clcpp
index 2ef27843d5ce3..127efbedded88 100644
--- a/clang/test/SemaOpenCLCXX/newdelete.cl
+++ b/clang/test/SemaOpenCLCXX/newdelete.clcpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -pedantic -verify -fsyntax-only
+// RUN: %clang_cc1 %s -triple spir-unknown-unknown -pedantic -verify -fsyntax-only
 
 class A {
   public:

diff  --git a/clang/test/SemaOpenCLCXX/references.cl b/clang/test/SemaOpenCLCXX/references.clcpp
similarity index 89%
rename from clang/test/SemaOpenCLCXX/references.cl
rename to clang/test/SemaOpenCLCXX/references.clcpp
index 42acb12729273..cffcc2cfbc29f 100644
--- a/clang/test/SemaOpenCLCXX/references.cl
+++ b/clang/test/SemaOpenCLCXX/references.clcpp
@@ -1,5 +1,5 @@
-//RUN: %clang_cc1 %s -cl-std=clc++ -verify -fsyntax-only -triple spir
-//RUN: %clang_cc1 %s -cl-std=clc++ -verify -fsyntax-only -DFPTREXT -triple spir
+//RUN: %clang_cc1 %s -verify -fsyntax-only -triple spir
+//RUN: %clang_cc1 %s -verify -fsyntax-only -DFPTREXT -triple spir
 
 #ifdef FPTREXT
 #pragma OPENCL EXTENSION __cl_clang_function_pointers : enable

diff  --git a/clang/test/SemaOpenCLCXX/restricted.cl b/clang/test/SemaOpenCLCXX/restricted.clcpp
similarity index 94%
rename from clang/test/SemaOpenCLCXX/restricted.cl
rename to clang/test/SemaOpenCLCXX/restricted.clcpp
index c00c634073fe7..2a84b4138b460 100644
--- a/clang/test/SemaOpenCLCXX/restricted.cl
+++ b/clang/test/SemaOpenCLCXX/restricted.clcpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -pedantic -verify -fsyntax-only
+// RUN: %clang_cc1 %s -triple spir-unknown-unknown -pedantic -verify -fsyntax-only
 
 // This test checks that various C/C++/OpenCL C constructs are not available in
 // C++ for OpenCL.

diff  --git a/clang/test/lit.cfg.py b/clang/test/lit.cfg.py
index f9f49d7d2278e..21b674539a30c 100644
--- a/clang/test/lit.cfg.py
+++ b/clang/test/lit.cfg.py
@@ -26,7 +26,7 @@
 
 # suffixes: A list of file extensions to treat as test files.
 config.suffixes = ['.c', '.cpp', '.i', '.cppm', '.m', '.mm', '.cu',
-                   '.ll', '.cl', '.s', '.S', '.modulemap', '.test', '.rs', '.ifs']
+                   '.ll', '.cl', '.clcpp', '.s', '.S', '.modulemap', '.test', '.rs', '.ifs']
 
 # excludes: A list of directories to exclude from the testsuite. The 'Inputs'
 # subdirectories contain auxiliary inputs for various tests in their parent


        


More information about the cfe-commits mailing list