aboutsummaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/constant-expression-cxx11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/constant-expression-cxx11.cpp')
-rw-r--r--test/SemaCXX/constant-expression-cxx11.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/SemaCXX/constant-expression-cxx11.cpp b/test/SemaCXX/constant-expression-cxx11.cpp
index 51dd6199e63a..fe4c54e7e6f2 100644
--- a/test/SemaCXX/constant-expression-cxx11.cpp
+++ b/test/SemaCXX/constant-expression-cxx11.cpp
@@ -629,6 +629,10 @@ namespace ArrayOfUnknownBound {
extern const int carr[]; // expected-note {{here}}
constexpr int n = carr[0]; // expected-error {{constant}} expected-note {{non-constexpr variable}}
+
+ constexpr int local_extern[] = {1, 2, 3};
+ void f() { extern const int local_extern[]; }
+ static_assert(local_extern[1] == 2, "");
}
namespace DependentValues {