diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2012-06-08 23:47:12 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2012-06-08 23:47:12 +0000 |
commit | d1e09a4282d905c4e6353c4f603e13900d95bee8 (patch) | |
tree | 94837265be4d7cc8ee4d1bf0eae25f986078eb1f /llvm/lib/Transforms/Utils/InlineFunction.cpp | |
parent | 1224312f5bd4cbbba11588baef5631037d117379 (diff) | |
download | bcm5719-llvm-d1e09a4282d905c4e6353c4f603e13900d95bee8.tar.gz bcm5719-llvm-d1e09a4282d905c4e6353c4f603e13900d95bee8.zip |
[C++11 Compat] Fix breaking change in C++11 pair copyctor.
While this code is valid C++98, it is not valid C++11. The problem can be
reduced to:
class MDNode;
class DIType {
operator MDNode*() const {return 0;}
};
class WeakVH {
WeakVH(MDNode*) {}
};
int main() {
DIType di;
std::pair<void*, WeakVH> p(std::make_pair((void*)0, di)));
}
This was not detected by any of the bots we have because they either compile
C++98 with libstdc++ (which allows it), or C++11 with libc++ (which incorrectly
allows it). I ran into the problem when compiling with VS 2012 RC.
Thanks to Richard for explaining the issue.
llvm-svn: 158245
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
0 files changed, 0 insertions, 0 deletions