llvm-project/clang
Aaron Puchert 6f84779674 [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
2020-11-15 18:05:11 +01:00
..
INPUTS
bindings [NFC] Don't run python binding tests with sanitizers 2020-10-29 23:48:08 -07:00
cmake [CMake] Explicity set up RPATH for the runtime libs on Win to ARM Linux cross builds. 2020-11-13 14:32:35 -08:00
docs Revert "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM" 2020-11-14 13:12:38 +03:00
examples Correct examples after d3205bbca3 2020-10-27 09:49:33 +01:00
include [Sema] Improve notes for value category mismatch in overloading 2020-11-15 18:05:11 +01:00
lib [Sema] Improve notes for value category mismatch in overloading 2020-11-15 18:05:11 +01:00
runtime [CMake][compiler-rt][libunwind] Compile assembly files as ASM not C, unify workarounds 2020-08-27 15:40:15 +03:00
test [Sema] Improve notes for value category mismatch in overloading 2020-11-15 18:05:11 +01:00
tools [git-clang-format] Process CUDA header files 2020-11-14 12:39:16 +00:00
unittests Add forgotten in 888d06d file. 2020-11-14 21:32:23 +00:00
utils Some updates/fixes to the creduce script. 2020-11-12 13:40:26 -08:00
www PR47954 / DR2126: permit temporary objects that are lifetime-extended by 2020-10-23 14:29:18 -07:00
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [clang] Limit scope of CLANG_VENDOR definition 2020-11-02 09:04:43 -08:00
CODE_OWNERS.TXT
INSTALL.txt
LICENSE.TXT
ModuleInfo.txt
NOTES.txt
README.txt

README.txt

//===----------------------------------------------------------------------===//
// C Language Family Front-end
//===----------------------------------------------------------------------===//

Welcome to Clang.  This is a compiler front-end for the C family of languages
(C, C++, Objective-C, and Objective-C++) which is built as part of the LLVM
compiler infrastructure project.

Unlike many other compiler frontends, Clang is useful for a number of things
beyond just compiling code: we intend for Clang to be host to a number of
different source-level tools.  One example of this is the Clang Static Analyzer.

If you're interested in more (including how to build Clang) it is best to read
the relevant web sites.  Here are some pointers:

Information on Clang:             http://clang.llvm.org/
Building and using Clang:         http://clang.llvm.org/get_started.html
Clang Static Analyzer:            http://clang-analyzer.llvm.org/
Information on the LLVM project:  http://llvm.org/

If you have questions or comments about Clang, a great place to discuss them is
on the Clang development mailing list:
  http://lists.llvm.org/mailman/listinfo/cfe-dev

If you find a bug in Clang, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/