diff options
author | Jonas Hahnfeld <jonas.hahnfeld@cern.ch> | 2025-10-06 10:34:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-10-06 10:34:49 +0200 |
commit | a9dafc9bdcfc1090d0744d0c708c5d133bc0fd84 (patch) | |
tree | 0a662ac91746a76f8fe1da55973a72508a6902a2 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 38896d67e458cf4d3b5ce0c3742f48e97527c797 (diff) | |
download | llvm-a9dafc9bdcfc1090d0744d0c708c5d133bc0fd84.zip llvm-a9dafc9bdcfc1090d0744d0c708c5d133bc0fd84.tar.gz llvm-a9dafc9bdcfc1090d0744d0c708c5d133bc0fd84.tar.bz2 |
[Sema] Compare canonical conversion function (#154158)
With lazy template loading, it is possible to find non-canonical
FunctionDecls, depending on when redecl chains are completed. This
is a problem for templated conversion operators that would allow to
call either the copy assignment or the move assignment operator.
This ambiguity is resolved by isBetterReferenceBindingKind (called
from CompareStandardConversionSequences) ranking rvalue refs over
lvalue refs.
Unfortunately, this fix is hard to test in isolation without the
changes in https://github.com/llvm/llvm-project/pull/133057 that
make lazy template loading more likely to complete redecl chains
at "inconvenient" times. The added reproducer passes before and
after this commit, but would have failed with the proposed changes
of the linked PR.
Kudos to Maksim Ivanov for providing an initial version of the
reproducer that I further simplified.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions