[LLVMbugs] [Bug 7702] New: unclear diagnostic after 'new'

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Jul 24 10:05:35 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=7702

           Summary: unclear diagnostic after 'new'
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: nicholas at mxc.ca
                CC: llvmbugs at cs.uiuc.edu


This diagnostic is confusing:

cm.cpp:77:17: error: missing type specifier after 'operator'
      Out = new raw_os_ostream(OutputFilename.c_str(), true);
                ^

What? gcc's is worse but at least I'm so used to it I knew what to do: add the
missing include.

Clang should've said something that means "no such type" instead of focusing on
the 'operator', which is really irrelevant and not obviously part of the code
(you say 'operator' I think of something like operator+ that has operator in
the name, and it took a moment to realize that it was talking about 'new').

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list