summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/i-c-e-cxx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/i-c-e-cxx.cpp')
-rw-r--r--test/SemaCXX/i-c-e-cxx.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/SemaCXX/i-c-e-cxx.cpp b/test/SemaCXX/i-c-e-cxx.cpp
index 8c70bc2..4f2f197 100644
--- a/test/SemaCXX/i-c-e-cxx.cpp
+++ b/test/SemaCXX/i-c-e-cxx.cpp
@@ -21,3 +21,19 @@ int a() {
case t:; // expected-error {{not an integer constant expression}}
}
}
+
+// PR6206: out-of-line definitions are legit
+namespace pr6206 {
+ class Foo {
+ public:
+ static const int kBar;
+ };
+
+ const int Foo::kBar = 20;
+
+ char Test() {
+ char str[Foo::kBar];
+ str[0] = '0';
+ return str[0];
+ }
+}
OpenPOWER on IntegriCloud