Index: clang/include/clang/Basic/LangStandards.def =================================================================== --- clang/include/clang/Basic/LangStandards.def +++ clang/include/clang/Basic/LangStandards.def @@ -194,11 +194,11 @@ // CUDA LANGSTANDARD(cuda, "cuda", CUDA, "NVIDIA CUDA(tm)", - LineComment | CPlusPlus | Digraphs) + LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs) // HIP LANGSTANDARD(hip, "hip", HIP, "HIP", - LineComment | CPlusPlus | Digraphs) + LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs) #undef LANGSTANDARD #undef LANGSTANDARD_ALIAS Index: clang/test/Parser/cuda-kernel-call.cu =================================================================== --- clang/test/Parser/cuda-kernel-call.cu +++ clang/test/Parser/cuda-kernel-call.cu @@ -12,8 +12,8 @@ // The following two are parse errors because -std=c++11 is not enabled. - S>> s; // expected-error 2{{use '> >'}} - S>> s1; // expected-error 2{{use '> >'}} - (void)(&f>>==0); // expected-error 2{{use '> >'}} - (void)(&f>>==0); // expected-error 2{{use '> >'}} + S>> s; + S>> s1; + (void)(&f>>==0); + (void)(&f>>==0); } Index: clang/test/Preprocessor/lang-std.cu =================================================================== --- /dev/null +++ clang/test/Preprocessor/lang-std.cu @@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -dM -E -x hip %s | FileCheck -check-prefix=CXX14 %s +// RUN: %clang_cc1 -dM -E %s | FileCheck -check-prefix=CXX14 %s +// RUN: %clang_cc1 -dM -E -std=c++98 -x hip %s | FileCheck -check-prefix=CXX98 %s +// RUN: %clang_cc1 -dM -E -std=c++98 %s | FileCheck -check-prefix=CXX98 %s + +// CXX98: #define __cplusplus 199711L +// CXX14: #define __cplusplus 201402L Index: clang/test/SemaCUDA/asm_delayed_diags.cu =================================================================== --- clang/test/SemaCUDA/asm_delayed_diags.cu +++ clang/test/SemaCUDA/asm_delayed_diags.cu @@ -28,7 +28,7 @@ } static __device__ __host__ double t3(double x) { - register long double result; + long double result; __asm __volatile("frndint" : "=t"(result) : "0"(x)); Index: clang/test/SemaCUDA/cuda-builtin-vars.cu =================================================================== --- clang/test/SemaCUDA/cuda-builtin-vars.cu +++ clang/test/SemaCUDA/cuda-builtin-vars.cu @@ -1,4 +1,5 @@ -// RUN: %clang_cc1 "-triple" "nvptx-nvidia-cuda" -fcuda-is-device -fsyntax-only -verify %s +// RUN: %clang_cc1 "-triple" "nvptx-nvidia-cuda" -fcuda-is-device -fsyntax-only -verify \ +// RUN: -verify-ignore-unexpected=note %s #include "__clang_cuda_builtin_vars.h" __attribute__((global)) @@ -37,17 +38,13 @@ // expected-note@__clang_cuda_builtin_vars.h:* {{variable 'warpSize' declared const here}} // Make sure we can't construct or assign to the special variables. - __cuda_builtin_threadIdx_t x; // expected-error {{calling a private constructor of class '__cuda_builtin_threadIdx_t'}} - // expected-note@__clang_cuda_builtin_vars.h:* {{declared private here}} + __cuda_builtin_threadIdx_t x; // expected-error {{call to deleted constructor of '__cuda_builtin_threadIdx_t'}} - __cuda_builtin_threadIdx_t y = threadIdx; // expected-error {{calling a private constructor of class '__cuda_builtin_threadIdx_t'}} - // expected-note@__clang_cuda_builtin_vars.h:* {{declared private here}} + __cuda_builtin_threadIdx_t y = threadIdx; // expected-error {{call to deleted constructor of '__cuda_builtin_threadIdx_t'}} - threadIdx = threadIdx; // expected-error {{'operator=' is a private member of '__cuda_builtin_threadIdx_t'}} - // expected-note@__clang_cuda_builtin_vars.h:* {{declared private here}} + threadIdx = threadIdx; // expected-error {{overload resolution selected deleted operator '='}} - void *ptr = &threadIdx; // expected-error {{'operator&' is a private member of '__cuda_builtin_threadIdx_t'}} - // expected-note@__clang_cuda_builtin_vars.h:* {{declared private here}} + void *ptr = &threadIdx; // expected-error {{overload resolution selected deleted operator '&'}} // Following line should've caused an error as one is not allowed to // take address of a built-in variable in CUDA. Alas there's no way Index: clang/test/SemaCUDA/function-target.cu =================================================================== --- clang/test/SemaCUDA/function-target.cu +++ clang/test/SemaCUDA/function-target.cu @@ -9,6 +9,7 @@ __global__ void h1g(void); struct h1ds { // expected-note {{requires 1 argument}} + // expected-note@-1 {{candidate constructor (the implicit move constructor) not viable}} __device__ h1ds(); // expected-note {{candidate constructor not viable: call to __device__ function from __host__ function}} }; Index: clang/test/SemaCUDA/implicit-member-target-collision.cu =================================================================== --- clang/test/SemaCUDA/implicit-member-target-collision.cu +++ clang/test/SemaCUDA/implicit-member-target-collision.cu @@ -19,6 +19,7 @@ // expected-note@-3 {{candidate constructor (the implicit default constructor}} not viable // expected-note@-4 {{implicit default constructor inferred target collision: call to both __host__ and __device__ members}} // expected-note@-5 {{candidate constructor (the implicit copy constructor}} not viable +// expected-note@-6 {{candidate constructor (the implicit move constructor) not viable}} void hostfoo1() { C1_with_collision c; // expected-error {{no matching constructor}} @@ -35,6 +36,7 @@ // expected-note@-5 {{candidate constructor (the implicit default constructor}} not viable // expected-note@-6 {{implicit default constructor inferred target collision: call to both __host__ and __device__ members}} // expected-note@-7 {{candidate constructor (the implicit copy constructor}} not viable +// expected-note@-8 {{candidate constructor (the implicit move constructor) not viable}} void hostfoo2() { C2_with_collision c; // expected-error {{no matching constructor}} @@ -51,6 +53,7 @@ // expected-note@-4 {{candidate constructor (the implicit default constructor}} not viable // expected-note@-5 {{implicit default constructor inferred target collision: call to both __host__ and __device__ members}} // expected-note@-6 {{candidate constructor (the implicit copy constructor}} not viable +// expected-note@-7 {{candidate constructor (the implicit move constructor) not viable}} void hostfoo3() { C3_with_collision c; // expected-error {{no matching constructor}}