diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-10-20 01:38:33 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-10-20 01:38:33 +0000 |
commit | 5016a70c183a50845a0421802d161093dd0643f6 (patch) | |
tree | f06564c7146ab4ad5e59659dc1b67741c07e2b17 /test/CodeGenCXX/const-init-cxx11.cpp | |
parent | 0872a06d1ee1a3b62ef833f955051418d18006a1 (diff) |
DR1472: A reference isn't odr-used if it has preceding initialization,
initialized by a reference constant expression.
Our odr-use modeling still needs work here: we don't yet implement the 'set of
potential results of an expression' DR.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166361 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/const-init-cxx11.cpp')
-rw-r--r-- | test/CodeGenCXX/const-init-cxx11.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/test/CodeGenCXX/const-init-cxx11.cpp b/test/CodeGenCXX/const-init-cxx11.cpp index db1bb41260..833adba8ba 100644 --- a/test/CodeGenCXX/const-init-cxx11.cpp +++ b/test/CodeGenCXX/const-init-cxx11.cpp @@ -432,11 +432,7 @@ namespace InitFromConst { // CHECK: call void @_ZN13InitFromConst7consumeIRKNS_1SEEEvT_(%"struct.InitFromConst::S"* @_ZN13InitFromConstL1sE) consume<const S&>(s); - // FIXME CHECK-NOT: call void @_ZN13InitFromConst7consumeIRKNS_1SEEEvT_(%"struct.InitFromConst::S"* @_ZN13InitFromConstL1sE) - // There's no lvalue-to-rvalue conversion here, so 'r' is odr-used, and - // we're permitted to emit a load of it. This seems likely to be a defect - // in the standard. If we start emitting a direct reference to 's', update - // this test. + // CHECK: call void @_ZN13InitFromConst7consumeIRKNS_1SEEEvT_(%"struct.InitFromConst::S"* @_ZN13InitFromConstL1sE) consume<const S&>(r); // CHECK: call void @_ZN13InitFromConst7consumeIPKNS_1SEEEvT_(%"struct.InitFromConst::S"* @_ZN13InitFromConstL1sE) |