Skip to content

Commit

Permalink
[NFC] Fix tests, second try
Browse files Browse the repository at this point in the history
llvm-svn: 373258
  • Loading branch information
davidbolvansky committed Sep 30, 2019
1 parent 6db4419 commit 2470328
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions clang/test/SemaCXX/warn-sign-conversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ namespace test2 {
int d1 = 1 ? i : Foo<bool>::D; // expected-warning {{operand of ? changes signedness: 'test2::Foo<bool>::Named4' to 'int'}}
int d2 = 1 ? Foo<bool>::D : i; // expected-warning {{operand of ? changes signedness: 'test2::Foo<bool>::Named4' to 'int'}}
int d3 = 1 ? B : Foo<bool>::D; // expected-warning {{operand of ? changes signedness: 'test2::Foo<bool>::Named4' to 'int'}}
// expected-warning@+1 {{enumeration type mismatch in conditional expression ('test2::Named2' and 'test2::Foo<bool>::Named4')}}
// expected-warning@-1 {{enumeration type mismatch in conditional expression ('test2::Named2' and 'test2::Foo<bool>::Named4')}}
int d4 = 1 ? Foo<bool>::D : B; // expected-warning {{operand of ? changes signedness: 'test2::Foo<bool>::Named4' to 'int'}}
// expected-warning@+1 {{enumeration type mismatch in conditional expression ('test2::Foo<bool>::Named4' and 'test2::Named2')}}
// expected-warning@-1 {{enumeration type mismatch in conditional expression ('test2::Foo<bool>::Named4' and 'test2::Named2')}}

int e1 = 1 ? i : E; // expected-warning {{operand of ? changes signedness: 'test2::Named5' to 'int'}}
int e2 = 1 ? E : i; // expected-warning {{operand of ? changes signedness: 'test2::Named5' to 'int'}}
int e3 = 1 ? E : B; // expected-warning {{operand of ? changes signedness: 'test2::Named5' to 'int'}}
// expected-warning@+1 {{enumeration type mismatch in conditional expression ('test2::Named5' and 'test2::Named2')}}
// expected-warning@-1 {{enumeration type mismatch in conditional expression ('test2::Named5' and 'test2::Named2')}}
int e4 = 1 ? B : E; // expected-warning {{operand of ? changes signedness: 'test2::Named5' to 'int'}}
// expected-warning@+1 {{enumeration type mismatch in conditional expression ('test2::Named2' and 'test2::Named5')}}
// expected-warning@-1 {{enumeration type mismatch in conditional expression ('test2::Named2' and 'test2::Named5')}}
}
}

0 comments on commit 2470328

Please sign in to comment.