]> granicus.if.org Git - clang/commit
[CodeGen] When promoting a reference temporary to a global use the inner type to...
authorBenjamin Kramer <benny.kra@googlemail.com>
Thu, 9 Apr 2015 16:09:29 +0000 (16:09 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 9 Apr 2015 16:09:29 +0000 (16:09 +0000)
commitb151ee84767d064394c94649231e79eb1bd7d72f
tree07827dd564f79b6d47ce90e60956cebb76e12612
parentd2eccb2430fadfc0ee144d7c34a042494c68a9be
[CodeGen] When promoting a reference temporary to a global use the inner type to fold it.

The MaterializeTemporaryExpr can have a different type than the inner
expression, miscompiling the constant. PR23165.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234499 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGExpr.cpp
test/CodeGenCXX/cxx0x-initializer-references.cpp