aboutsummaryrefslogtreecommitdiff
path: root/test/SemaOpenCL/multistep-explicit-cast.cl
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaOpenCL/multistep-explicit-cast.cl')
-rw-r--r--test/SemaOpenCL/multistep-explicit-cast.cl13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/SemaOpenCL/multistep-explicit-cast.cl b/test/SemaOpenCL/multistep-explicit-cast.cl
new file mode 100644
index 000000000000..5e3d12a0e449
--- /dev/null
+++ b/test/SemaOpenCL/multistep-explicit-cast.cl
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -ast-dump %s | FileCheck %s
+// expected-no-diagnostics
+
+typedef __attribute__((ext_vector_type(2))) char char2;
+
+void vectorIncrementDecrementOps() {
+ // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} vectorIncrementDecrementOps 'void (void)'{{$}}
+ // CHECK: CStyleCastExpr {{.*}} <col:{{.*}}> 'char2':'char __attribute__((ext_vector_type(2)))' <VectorSplat>{{$}}
+ // CHECK-NEXT: ImplicitCastExpr {{.*}} <col:{{.*}}> 'char' <IntegralCast> part_of_explicit_cast{{$}}
+ // CHECK-NEXT: IntegerLiteral {{.*}} <col:{{.*}}> 'int' 1{{$}}
+ char2 A = (char2)(1);
+ A++;
+}