diff options
Diffstat (limited to 'test/SemaCXX/uninit-variables.cpp')
-rw-r--r-- | test/SemaCXX/uninit-variables.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/SemaCXX/uninit-variables.cpp b/test/SemaCXX/uninit-variables.cpp index 687bfd2638d4..4dcd34858abb 100644 --- a/test/SemaCXX/uninit-variables.cpp +++ b/test/SemaCXX/uninit-variables.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -Wuninitialized -fsyntax-only -fcxx-exceptions %s -verify +// RUN: %clang_cc1 -fsyntax-only -Wuninitialized -fsyntax-only -fcxx-exceptions %s -verify -std=c++1y // Stub out types for 'typeid' to work. namespace std { class type_info {}; } @@ -147,3 +147,6 @@ int test_const_ref() { consume_const_ref(n); return n; // expected-warning {{uninitialized when used here}} } + +// Don't crash here. +auto PR19996 = [a=0]{int t; return a;}; |