You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
400 B
14 lines
400 B
// RUN: %clang_cc1 -triple=x86_64-pc-linux-gnu -fsyntax-only -verify -DUNSIGNED -Wsign-conversion %s
|
|
// RUN: %clang_cc1 -triple=x86_64-pc-win32 -fsyntax-only -verify -Wsign-conversion %s
|
|
|
|
// PR35200
|
|
enum X { A,B,C};
|
|
int f(enum X x) {
|
|
#ifdef UNSIGNED
|
|
return x; // expected-warning {{implicit conversion changes signedness: 'enum X' to 'int'}}
|
|
#else
|
|
// expected-no-diagnostics
|
|
return x;
|
|
#endif
|
|
}
|