No longer allow the -std options to entirely override the -x language option. This allows -x cuda -std=c++11, for instance.
llvm-svn: 209824
diff --git a/clang/test/Frontend/stdlang.c b/clang/test/Frontend/stdlang.c
new file mode 100644
index 0000000..71997f1
--- /dev/null
+++ b/clang/test/Frontend/stdlang.c
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -x cuda -std=c++11 -DCUDA %s
+// RUN: %clang_cc1 -x cl -std=c99 -DOPENCL %s
+// expected-no-diagnostics
+
+#if defined(CUDA)
+ __attribute__((device)) void f_device();
+#elif defined(OPENCL)
+ kernel void func(void);
+#endif
diff --git a/clang/test/Index/attributes-cuda.cu b/clang/test/Index/attributes-cuda.cu
index dd571f1..953ef3d 100644
--- a/clang/test/Index/attributes-cuda.cu
+++ b/clang/test/Index/attributes-cuda.cu
@@ -1,11 +1,10 @@
-// RUN: c-index-test -test-load-source all -x cuda -std=cuda %s | FileCheck %s
+// RUN: c-index-test -test-load-source all -x cuda %s | FileCheck %s
__attribute__((device)) void f_device();
__attribute__((global)) void f_global();
__attribute__((constant)) int* g_constant;
__attribute__((host)) void f_host();
-
// CHECK: attributes-cuda.cu:3:30: FunctionDecl=f_device:3:30
// CHECK-NEXT: attributes-cuda.cu:3:16: attribute(device)
// CHECK: attributes-cuda.cu:4:30: FunctionDecl=f_global:4:30