blob: b9f949ffe2fcd5d1e9fedb88ff2128df000148d6 [file] [log] [blame]
Matt Arsenault0ff50d42018-12-01 22:16:27 +00001// RUN: cp %s %t
2// RUN: %clang_cc1 -cl-std=CL1.2 -pedantic -Wall -fixit %t
3// RUN: %clang_cc1 -cl-std=CL1.2 -fsyntax-only -pedantic -Wall -Werror %t
4// RUN: %clang_cc1 -cl-std=CL1.2 -E -o - %t | FileCheck %s
5
6typedef __attribute__((ext_vector_type(4))) int int4;
7typedef __attribute__((ext_vector_type(8))) int int8;
8
9int printf(__constant const char* st, ...) __attribute__((format(printf, 1, 2)));
10
11
12void vector_fixits() {
13 printf("%v4f", (int4) 123);
14 // CHECK: printf("%v4d", (int4) 123);
15
16 printf("%v8d", (int4) 123);
17 // CHECK: printf("%v4d", (int4) 123);
18
19 printf("%v4d", (int8) 123);
20 // CHECK: printf("%v8d", (int8) 123);
21
22 printf("%v4f", (int8) 123);
23 // CHECK: printf("%v8d", (int8) 123);
24}