summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorGabor Horvath <xazax.hun@gmail.com>2017-08-09 20:56:43 +0000
committerGabor Horvath <xazax.hun@gmail.com>2017-08-09 20:56:43 +0000
commit0284a20fbafae760a21aca9fde47efbec9f6afcb (patch)
treeac4bf460639cdb724324a0c4d15d63235abd86cc /clang/test
parentf983a410c99dcaa07d74d15c2848245360e3b812 (diff)
downloadbcm5719-llvm-0284a20fbafae760a21aca9fde47efbec9f6afcb.tar.gz
bcm5719-llvm-0284a20fbafae760a21aca9fde47efbec9f6afcb.zip
[Sema] Assign new flag -Wenum-compare-switch to switch-related parts of -Wenum-compare
Patch by: Reka Nikolett Kovacs Differential Revision: https://reviews.llvm.org/D36526 llvm-svn: 310521
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Sema/switch.c2
-rw-r--r--clang/test/SemaCXX/warn-enum-compare.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/Sema/switch.c b/clang/test/Sema/switch.c
index e4e4ee5497a..a33300b41f5 100644
--- a/clang/test/Sema/switch.c
+++ b/clang/test/Sema/switch.c
@@ -372,7 +372,7 @@ void switch_on_ExtendedEnum1(enum ExtendedEnum1 e) {
case EE1_b: break;
case EE1_c: break; // no-warning
case EE1_d: break; // expected-warning {{case value not in enumerated type 'enum ExtendedEnum1'}}
- // expected-warning@-1 {{comparison of two values with different enumeration types ('enum ExtendedEnum1' and 'const enum ExtendedEnum1_unrelated')}}
+ // expected-warning@-1 {{comparison of two values with different enumeration types in switch statement ('enum ExtendedEnum1' and 'const enum ExtendedEnum1_unrelated')}}
}
}
diff --git a/clang/test/SemaCXX/warn-enum-compare.cpp b/clang/test/SemaCXX/warn-enum-compare.cpp
index f82f7750be8..0d7558dba7d 100644
--- a/clang/test/SemaCXX/warn-enum-compare.cpp
+++ b/clang/test/SemaCXX/warn-enum-compare.cpp
@@ -212,19 +212,19 @@ void test () {
switch (a) {
case name1::F1: break;
case name1::F3: break;
- case name2::B2: break; // expected-warning {{comparison of two values with different enumeration types ('name1::Foo' and 'name2::Baz')}}
+ case name2::B2: break; // expected-warning {{comparison of two values with different enumeration types in switch statement ('name1::Foo' and 'name2::Baz')}}
}
switch (x) {
case FooB: break;
case FooC: break;
- case BarD: break; // expected-warning {{comparison of two values with different enumeration types ('Foo' and 'Bar')}}
+ case BarD: break; // expected-warning {{comparison of two values with different enumeration types in switch statement ('Foo' and 'Bar')}}
}
switch(getBar()) {
case BarE: break;
case BarF: break;
- case FooA: break; // expected-warning {{comparison of two values with different enumeration types ('Bar' and 'Foo')}}
+ case FooA: break; // expected-warning {{comparison of two values with different enumeration types in switch statement ('Bar' and 'Foo')}}
}
switch(x) {
OpenPOWER on IntegriCloud