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

           Summary: clang: better diagnostic for member function
                    declaration typo
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


Testcase:
class A {
  int foo();
};
int A::foo();
{
  return 4;
}

clang++ outputs:
x.cpp:4:8: error: out-of-line declaration of a member must be a definition
int A::foo();
    ~~~^
x.cpp:5:1: error: expected unqualified-id
{
^
2 diagnostics generated.

It'd be better if it'd recognize the ';' typo (or rather copy-pasto), and give
a better hint at whats wrong.

It could recognize ';' followed by '{' as a typo.

-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to