diff options
Diffstat (limited to 'test/SemaCXX/warn-dangling-local.cpp')
-rw-r--r-- | test/SemaCXX/warn-dangling-local.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/SemaCXX/warn-dangling-local.cpp b/test/SemaCXX/warn-dangling-local.cpp index 19a722f84d16..5c1d56972945 100644 --- a/test/SemaCXX/warn-dangling-local.cpp +++ b/test/SemaCXX/warn-dangling-local.cpp @@ -18,3 +18,9 @@ void f() { // points to, which doesn't live long enough. int *const &s = (int *const &)T{1, 2, 3}; // expected-warning {{temporary bound to local reference 's' will be destroyed at the end of the full-expression}} } + +// PR38355 +void g() { + const int a[] = {a[0]}; + const int b[] = {a[0]}; +} |