Matt Arsenault | 0ff50d4 | 2018-12-01 22:16:27 +0000 | [diff] [blame^] | 1 | // 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 | |
| 6 | typedef __attribute__((ext_vector_type(4))) int int4; |
| 7 | typedef __attribute__((ext_vector_type(8))) int int8; |
| 8 | |
| 9 | int printf(__constant const char* st, ...) __attribute__((format(printf, 1, 2))); |
| 10 | |
| 11 | |
| 12 | void 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 | } |