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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    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.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to