aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/condition.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/condition.cpp')
-rw-r--r--test/SemaCXX/condition.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/SemaCXX/condition.cpp b/test/SemaCXX/condition.cpp
index 73f3dceef64e..b757fcb8cd5c 100644
--- a/test/SemaCXX/condition.cpp
+++ b/test/SemaCXX/condition.cpp
@@ -17,9 +17,9 @@ void test() {
switch (s) {} // expected-error {{statement requires expression of integer type ('struct S' invalid)}}
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}}
+ while (struct S {} *x=0) ; // expected-error {{'S' cannot be defined in a condition}}
+ while (struct {} *x=0) ; // expected-error-re {{'(anonymous struct at {{.*}})' cannot be defined in a condition}}
+ switch (enum {E} x=0) ; // expected-error-re {{'(anonymous enum at {{.*}})' cannot be defined in a condition}}
if (int x=0) { // expected-note 2 {{previous definition is here}}
int x; // expected-error {{redefinition of 'x'}}
@@ -59,7 +59,7 @@ void test4(bool (&x)(void)) {
template <class>
void test5() {
- if (struct S {}* p = 0) // expected-error {{types may not be defined in conditions}}
+ if (struct S {}* p = 0) // expected-error {{'S' cannot be defined in a condition}}
;
}
void test5_inst() {