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.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/SemaCXX/condition.cpp b/test/SemaCXX/condition.cpp
index 61d1762..3441bae 100644
--- a/test/SemaCXX/condition.cpp
+++ b/test/SemaCXX/condition.cpp
@@ -16,8 +16,9 @@ void test() {
for (;s;) ; // expected-error {{value of type 'struct S' is not contextually convertible to 'bool'}}
switch (s) {} // expected-error {{statement requires expression of integer type ('struct S' invalid)}}
- 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 {{not contextually convertible to 'bool'}} expected-note{{candidate constructor (the implicit copy constructor)}}
+ while (struct NewS *x=0) ;
+ while (struct S {} *x=0) ; // expected-error {{types may not be defined in conditions}}
+ while (struct {} *x=0) ; // expected-error {{types may not be defined in conditions}}
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}}
OpenPOWER on IntegriCloud