diff options
Diffstat (limited to 'clang/test/AST/Interp/arrays.cpp')
| -rw-r--r-- | clang/test/AST/Interp/arrays.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/AST/Interp/arrays.cpp b/clang/test/AST/Interp/arrays.cpp index 929f25b95fa1..e936ec6dc894 100644 --- a/clang/test/AST/Interp/arrays.cpp +++ b/clang/test/AST/Interp/arrays.cpp @@ -26,6 +26,7 @@ static_assert(foo[2][2] == nullptr, ""); static_assert(foo[2][3] == &m, ""); static_assert(foo[2][4] == nullptr, ""); +constexpr int ZeroSizeArray[] = {}; constexpr int SomeInt[] = {1}; constexpr int getSomeInt() { return *SomeInt; } @@ -595,3 +596,12 @@ int test_multiarray22() { } #endif + +namespace ArrayMemberAccess { + struct A { + int x; + }; + void f(const A (&a)[]) { + bool cond = a->x; + } +} |
