[ORC-RT][LoongArch] Add initial support for loongarch64 in ELFNixPlatform (#123575)
[llvm-project.git] / clang / test / Sema / conversion-implicit-int-includes-64-to-32.c
blobe22ccbe821f65c1544fd1db345e0396990459f7f
1 // RUN: %clang_cc1 -fsyntax-only -verify -Wimplicit-int-conversion -triple x86_64-apple-darwin %s
3 int test0(long v) {
4 return v; // expected-warning {{implicit conversion loses integer precision}}
7 typedef int int4 __attribute__ ((vector_size(16)));
8 typedef long long long2 __attribute__((__vector_size__(16)));
10 int4 test1(long2 a) {
11 int4 v127 = a; // no warning.
12 return v127;
15 int test2(long v) {
16 return v / 2; // expected-warning {{implicit conversion loses integer precision: 'long' to 'int'}}
19 char test3(short s) {
20 return s * 2; // expected-warning {{implicit conversion loses integer precision: 'int' to 'char'}}