diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-06-05 00:46:14 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-06-05 00:46:14 +0000 |
commit | e6c0144208a4352c7c50616508081278c2ee5f88 (patch) | |
tree | e0a9174e018e3f66e20d23282a1411af866c5f51 /clang/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp | |
parent | 23399d765cea1b0f7e3ec8e63c1390a1f992a950 (diff) | |
download | bcm5719-llvm-e6c0144208a4352c7c50616508081278c2ee5f88.tar.gz bcm5719-llvm-e6c0144208a4352c7c50616508081278c2ee5f88.zip |
Model temporary lifetime-extension explicitly in the AST. Use this model to
handle temporaries which have been lifetime-extended to static storage duration
within constant expressions. This correctly handles nested lifetime extension
(through reference members of aggregates in aggregate initializers) but
non-constant-expression emission hasn't yet been updated to do the same.
llvm-svn: 183283
Diffstat (limited to 'clang/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp b/clang/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp index 75c04e7fae5..54d88f565ee 100644 --- a/clang/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp +++ b/clang/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp @@ -284,4 +284,7 @@ namespace dtors { void f() { std::initializer_list<S>{ S(), S() }; } + void g() { + auto x = std::initializer_list<S>{ S(), S() }; + } } |