]> granicus.if.org Git - clang/commit
When building a conditional operator where one operand is a throw-expression
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 7 Aug 2012 22:06:48 +0000 (22:06 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 7 Aug 2012 22:06:48 +0000 (22:06 +0000)
commit604fb38cd943649bee579103d17ca6cda4aad144
tree925637a7c38207a565dc74f11678113e6d75e100
parent0b8220ae342f71fb50e763668f92d038eb54fb3f
When building a conditional operator where one operand is a throw-expression
and the other is a glvalue of class type, don't forget to copy-initialize a
temporary when performing the lvalue-to-rvalue conversion on the glvalue.
Strangely, DefaultLvalueConversions misses this part of the lvalue-to-rvalue
conversions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161450 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaExprCXX.cpp
test/SemaCXX/constant-expression-cxx11.cpp