2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify -Wshorten-64-to-32 -triple x86_64-apple-darwin %s
|
2009-11-07 17:03:53 +08:00
|
|
|
|
|
|
|
int test0(long v) {
|
2010-07-10 02:18:35 +08:00
|
|
|
return v; // expected-warning {{implicit conversion loses integer precision}}
|
2009-11-07 17:03:53 +08:00
|
|
|
}
|
2011-06-14 12:51:15 +08:00
|
|
|
|
|
|
|
|
|
|
|
// rdar://9546171
|
|
|
|
typedef int int4 __attribute__ ((vector_size(16)));
|
|
|
|
typedef long long long2 __attribute__((__vector_size__(16)));
|
|
|
|
|
|
|
|
int4 test1(long2 a) {
|
|
|
|
int4 v127 = a; // no warning.
|
|
|
|
return v127;
|
|
|
|
}
|