[llvm-bugs] [Bug 29090] New: Invalid diagnostic on conversion error of implicit object parameter for ref-qualified methods
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Aug 22 07:24:36 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=29090
Bug ID: 29090
Summary: Invalid diagnostic on conversion error of implicit
object parameter for ref-qualified methods
Product: clang
Version: 3.9
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: clement.courbet at gmail.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
refref.cc:
struct A {
void f() && {}
};
void g() {
A a;
a.f();
}
clang++ -std=c++11 -c refref.cc
refref.cc:7:3: error: cannot initialize object parameter of type 'A' with an
expression of type 'A'
a.f();
I would expect:
refref.cc:7:3: error: cannot initialize object parameter of type 'A&&' with an
expression of type 'A'
a.f();
Or:
refref.cc:7:3: error:member function 'f' not viable: 'this' argument has type
'A', but function is marked &&.
(the latter is modeled after the error message when a is const but f() is not
const-qualified)
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160822/19c44d52/attachment.html>
More information about the llvm-bugs
mailing list