blob: 112e995102c59e6aac0ab9e1842136934ae31e66 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify -Wshorten-64-to-32 -triple x86_64-apple-darwin %s
John McCalldc767a12009-11-07 09:03:53 +00002
3int test0(long v) {
Douglas Gregor27f46ee2010-07-09 18:18:35 +00004 return v; // expected-warning {{implicit conversion loses integer precision}}
John McCalldc767a12009-11-07 09:03:53 +00005}
Chris Lattnerb792b302011-06-14 04:51:15 +00006
7
8// rdar://9546171
9typedef int int4 __attribute__ ((vector_size(16)));
10typedef long long long2 __attribute__((__vector_size__(16)));
11
12int4 test1(long2 a) {
13 int4 v127 = a; // no warning.
14 return v127;
15}