diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-01-10 01:28:13 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-01-10 01:28:13 +0000 |
commit | dbc82492248a72fafa40e3ecfd48b28a271d7b99 (patch) | |
tree | 7d0e15b38a288d6ef03bf7355bd67031bf1e9a5b /clang/test/CodeGenCXX/temporaries.cpp | |
parent | 43a0f99b103dc9c2546e650b99f5501e49e74dd2 (diff) | |
download | bcm5719-llvm-dbc82492248a72fafa40e3ecfd48b28a271d7b99.tar.gz bcm5719-llvm-dbc82492248a72fafa40e3ecfd48b28a271d7b99.zip |
Fix temporary lifetime extension from an initializer using braced "functional"
cast notation T{...} when T is a reference type.
llvm-svn: 225571
Diffstat (limited to 'clang/test/CodeGenCXX/temporaries.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/temporaries.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/temporaries.cpp b/clang/test/CodeGenCXX/temporaries.cpp index 7f5c7af0386..89677cb1e4e 100644 --- a/clang/test/CodeGenCXX/temporaries.cpp +++ b/clang/test/CodeGenCXX/temporaries.cpp @@ -42,6 +42,13 @@ namespace PR20227 { // CHECK: @_ZGRN7PR202271cE_ = private global } +namespace BraceInit { + typedef const int &CIR; + CIR x = CIR{3}; + // CHECK: @_ZGRN9BraceInit1xE_ = private constant i32 3 + // CHECK: @_ZN9BraceInit1xE = constant i32* @_ZGRN9BraceInit1xE_ +} + struct A { A(); ~A(); |