[LLVMbugs] [Bug 10659] New: Missing type in constructor argument list gives poor error message

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Aug 15 09:50:19 PDT 2011


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

           Summary: Missing type in constructor argument list gives poor
                    error message
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: fischman at chromium.org
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


clang r136602 gives uninformative error messages for undeclared types used in
constructor arguments.  IWBN if instead of the following it actually said
something to the effect of "Unknown type: Bar".

$ clang++ -c t.cc
t.cc:2:10: error: expected ')'
  Foo(Bar* b) {}
         ^
t.cc:2:6: note: to match this '('
  Foo(Bar* b) {}
     ^
t.cc:2:15: error: function definition does not declare parameters
  Foo(Bar* b) {}
              ^
2 errors generated.

This is t.cc:
struct Foo {
  Foo(Bar* b) {}
};

-- 
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