[llvm-bugs] [Bug 31067] New: Diagnostic when calling rvalue-qualified functions without an rvalue is not unhelpful
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Nov 18 22:17:09 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=31067
Bug ID: 31067
Summary: Diagnostic when calling rvalue-qualified functions
without an rvalue is not unhelpful
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: dcheng at google.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
$ cat test.cc
int main() {
struct C {
void F() && {}
};
C c;
c.F();
}
$ third_party/llvm-build/Release+Asserts/bin/clang++ -std=c++11 test.cc
test.cc:6:3: error: cannot initialize object parameter of type 'C' with an
expression of type 'C'
c.F();
^
1 error generated.
It would be nice if clang hinted that c isn't an rvalue.
--
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/20161119/f8ae331e/attachment.html>
More information about the llvm-bugs
mailing list