diff options
author | Aaron Puchert <aaronpuchert@alice-dsl.net> | 2020-11-15 16:11:23 +0100 |
---|---|---|
committer | Aaron Puchert <aaronpuchert@alice-dsl.net> | 2020-11-15 18:05:11 +0100 |
commit | 6f84779674a9764c6adee29b9a48ed3b3f0d5132 (patch) | |
tree | 9f41fce4347fa277eaabdf653d70ca350efb8be1 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | d2acf229279233a6ff7317cc2268a65b7bc5fe80 (diff) | |
download | llvm-6f84779674a9764c6adee29b9a48ed3b3f0d5132.zip llvm-6f84779674a9764c6adee29b9a48ed3b3f0d5132.tar.gz llvm-6f84779674a9764c6adee29b9a48ed3b3f0d5132.tar.bz2 |
[Sema] Improve notes for value category mismatch in overloading
When an overloaded member function has a ref-qualifier, like:
class X {
void f() &&;
void f(int) &;
};
we would print strange notes when the ref-qualifier doesn't fit the value
category:
X x;
x.f();
X().f(0);
would both print a note "no known conversion from 'X' to 'X' for object
argument" on their relevant overload instead of pointing out the
mismatch in value category.
At first I thought the solution is easy: just use the FailureKind member
of the BadConversionSequence struct. But it turns out that we weren't
properly setting this for function arguments. So I went through
TryReferenceInit to make sure we're doing that right, and found a number
of notes in the existing tests that improved as well.
Fixes PR47791.
Reviewed By: rsmith
Differential Revision: https://reviews.llvm.org/D90123
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions