summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/condition.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/condition.cpp')
-rw-r--r--test/SemaCXX/condition.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/SemaCXX/condition.cpp b/test/SemaCXX/condition.cpp
index fe802d0..b3e862d 100644
--- a/test/SemaCXX/condition.cpp
+++ b/test/SemaCXX/condition.cpp
@@ -18,7 +18,8 @@ void test() {
while (struct S {} x=0) ; // expected-error {{types may not be defined in conditions}} expected-error {{no viable conversion}} expected-error {{value of type 'struct S' is not contextually convertible to 'bool'}} expected-note{{candidate constructor (the implicit copy constructor)}}
while (struct {} x=0) ; // expected-error {{types may not be defined in conditions}} expected-error {{no viable conversion}} expected-error {{value of type 'struct <anonymous>' is not contextually convertible to 'bool'}} expected-note{{candidate constructor (the implicit copy constructor)}}
- switch (enum {E} x=0) ; // expected-error {{types may not be defined in conditions}} expected-error {{cannot initialize}}
+ switch (enum {E} x=0) ; // expected-error {{types may not be defined in conditions}} expected-error {{cannot initialize}} \
+ // expected-warning{{enumeration value 'E' not handled in switch}}
if (int x=0) { // expected-note 2 {{previous definition is here}}
int x; // expected-error {{redefinition of 'x'}}
OpenPOWER on IntegriCloud