aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Sema/implicit-cast.c
blob: 4700b7d37a8556bd72f1908cb5e5f0d8f1245f7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: %clang_cc1 -fsyntax-only -verify %s

static char *test1(int cf) {
  return cf ? "abc" : 0;
}
static char *test2(int cf) {
  return cf ? 0 : "abc";
}

int baz(void) {
  int f;
  return ((void)0, f = 1.4f); // expected-warning {{implicit conversion from 'float' to 'int' changes value from 1.4 to 1}}
}