summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/class.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/class.cpp')
-rw-r--r--test/SemaCXX/class.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/SemaCXX/class.cpp b/test/SemaCXX/class.cpp
index d2a8114..2637f32 100644
--- a/test/SemaCXX/class.cpp
+++ b/test/SemaCXX/class.cpp
@@ -110,3 +110,11 @@ struct C4 {
void f(); // expected-note{{previous declaration is here}}
int f; // expected-error{{duplicate member 'f'}}
};
+
+// PR5415 - don't hang!
+struct S
+{
+ void f(); // expected-note 1 {{previous declaration}}
+ void S::f() {} // expected-error {{class member cannot be redeclared}} expected-note {{previous declaration}} expected-note {{previous definition}}
+ void f() {} // expected-error {{class member cannot be redeclared}} expected-error {{redefinition}}
+};
OpenPOWER on IntegriCloud