• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -triple=x86_64-pc-linux-gnu -fsyntax-only -verify -DUNSIGNED -Wsign-conversion %s
2 // RUN: %clang_cc1 -triple=x86_64-pc-win32 -fsyntax-only -verify -Wsign-conversion %s
3 
4 // PR35200
5 enum X { A,B,C};
f(enum X x)6 int f(enum X x) {
7 #ifdef UNSIGNED
8   return x; // expected-warning {{implicit conversion changes signedness: 'enum X' to 'int'}}
9 #else
10   // expected-no-diagnostics
11   return x;
12 #endif
13 }
14