diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-07-11 23:19:41 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-07-11 23:19:41 +0000 |
commit | b884ed186eb705c4c5b5ebfcc864f3cfc8794bbb (patch) | |
tree | 29b2a3a1912a6b617c7ecc3992da8572c579322e /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | |
parent | dc7200b486b6c5b5229abcee97c160145cc3d955 (diff) | |
download | bcm5719-llvm-b884ed186eb705c4c5b5ebfcc864f3cfc8794bbb.tar.gz bcm5719-llvm-b884ed186eb705c4c5b5ebfcc864f3cfc8794bbb.zip |
Fix deduction for conversion function templates converting to reference
types.
We previously tried to use the "parameter is a reference" logic here,
but that doesn't work because it gets P and A backwards. Instead, add
a separate implementation of the "deduced A can be less qualified than
A" rule.
This also exposes that we incorrectly stripped cv-qualifiers from the
referent of A if it was a reference. However, if we don't do that, we
get the wrong results when P is a reference. In an attempt to match
what sanity dictates and what other implementations are doing, we now
remove cv-qualifiers from A and P unless both are reference types. I've
brought this up on the core reflector too, to try to get the standard
fixed.
llvm-svn: 336867
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
0 files changed, 0 insertions, 0 deletions