brintos

brintos / llvm-project-archived public Read only

0
0
Text · 565 B · c172dd1 Raw
22 lines · c
1// RUN: %clang_cc1 -fsyntax-only -verify -Wshorten-64-to-32 -triple x86_64-apple-darwin %s2 3int test0(long v) {4  return v; // expected-warning {{implicit conversion loses integer precision}}5}6 7typedef int  int4  __attribute__ ((vector_size(16)));8typedef long long long2 __attribute__((__vector_size__(16)));9 10int4 test1(long2 a) {11  int4  v127 = a;  // no warning.12  return v127;13}14 15int test2(long v) {16  return v / 2; // expected-warning {{implicit conversion loses integer precision: 'long' to 'int'}}17}18 19char test3(short s) {20  return s * 2; // no warning.21}22