summaryrefslogtreecommitdiffstats
path: root/test/SemaOpenCLCXX/address-space-deduction.cl
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaOpenCLCXX/address-space-deduction.cl')
-rw-r--r--test/SemaOpenCLCXX/address-space-deduction.cl12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/SemaOpenCLCXX/address-space-deduction.cl b/test/SemaOpenCLCXX/address-space-deduction.cl
new file mode 100644
index 0000000000..d6dcc853a6
--- /dev/null
+++ b/test/SemaOpenCLCXX/address-space-deduction.cl
@@ -0,0 +1,12 @@
+//RUN: %clang_cc1 %s -cl-std=c++ -pedantic -ast-dump -verify
+
+//expected-no-diagnostics
+
+//CHECK: |-VarDecl foo {{.*}} 'const __global int' constexpr cinit
+constexpr int foo = 0;
+
+class c {
+public:
+ //CHECK: `-VarDecl {{.*}} foo2 'const __global int' static constexpr cinit
+ static constexpr int foo2 = 0;
+};