aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/cxx0x-class.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/cxx0x-class.cpp')
-rw-r--r--test/SemaCXX/cxx0x-class.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaCXX/cxx0x-class.cpp b/test/SemaCXX/cxx0x-class.cpp
index d5590c5e22..41b0a5ce95 100644
--- a/test/SemaCXX/cxx0x-class.cpp
+++ b/test/SemaCXX/cxx0x-class.cpp
@@ -26,3 +26,14 @@ namespace rdar8367341 {
static constexpr float y2 = foo(); // expected-error {{must be initialized by a constant expression}} expected-note {{non-constexpr function 'foo'}}
};
}
+
+
+namespace Foo {
+ // Regression test -- forward declaration of Foo should not cause error about
+ // nonstatic data member.
+ class Foo;
+ class Foo {
+ int x;
+ int y = x;
+ };
+}