mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-26 14:58:59 -04:00

Basically a regression after r316268. However the diagnostic is correct, but the test coverage is bad. So just like rL316500, introduce yet more tests, and adjust the release notes. See https://bugs.llvm.org/show_bug.cgi?id=35200 llvm-svn: 317421
14 lines
400 B
C
14 lines
400 B
C
// 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
|
|
}
|