[LLVMbugs] [Bug 23615] New: Bad diagnostic on missing operator() for object

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu May 21 05:53:43 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23615

            Bug ID: 23615
           Summary: Bad diagnostic on missing operator() for object
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: gonzalobg88 at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

In the following minimal example there is an error:

Minimal example:

#include<iostream>
int main() {
  std::cout << std::endl();
  return 0;
}

I found it really hard to tell the error form the generated diagnostic:

error: no matching function for call to 'endl'
      std::cout << std::endl();
                   ^~~~~~~~~
/include/libcxx/ostream:1032:1: note: candidate function template not viable:
requires single argument '__os', but no arguments were provided
endl(basic_ostream<_CharT, _Traits>& __os)
^

I think it would be better if the exact error would be spelled out again:

"object std::endl of type ___ does not have a function call operator
operator()"

before including the note, since in this case the note confused me and pointed
me in the wrong direction.

-- 
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/20150521/798641d0/attachment.html>


More information about the llvm-bugs mailing list