aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Module.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard@metafoo.co.uk>2020-01-30 17:11:47 -0800
committerRichard Smith <richard@metafoo.co.uk>2020-01-30 17:16:50 -0800
commit1f3f8c369a5067a132c871f33a955a7feaea8534 (patch)
tree0e8458e3a6cf4c65217edce3c80fb426765499ba /llvm/lib/IR/Module.cpp
parentd28763cad06e66651e1936756d3e28126b055abf (diff)
downloadllvm-1f3f8c369a5067a132c871f33a955a7feaea8534.zip
llvm-1f3f8c369a5067a132c871f33a955a7feaea8534.tar.gz
llvm-1f3f8c369a5067a132c871f33a955a7feaea8534.tar.bz2
PR44721: Don't consider overloaded operators for built-in comparisons
when building a defaulted comparison. As a convenient way of asking whether `x @ y` is valid and building it, we previouly always performed overload resolution and built an overloaded expression, which would both end up picking a builtin operator candidate when given a non-overloadable type. But that's not quite right, because it can result in our finding a user-declared operator overload, which we should never do when applying operators non-overloadable types. Handle this more correctly: skip overload resolution when building `x @ y` if the operands are not overloadable. But still perform overload resolution (considering only builtin candidates) when checking validity, as we don't have any other good way to ask whether a binary operator expression would be valid.
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
0 files changed, 0 insertions, 0 deletions