[cfe-commits] r137966 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/SemaCXX/function-redecl.cpp

Jordy Rose jediknil at belkadan.com
Thu Aug 18 14:30:49 PDT 2011


Haven't tested it, but it seems like this would also be bad for const/non-const mismatches:

struct A { int typo() const; };
int A::typo_() { return 3; }


On Aug 18, 2011, at 13:38, Eli Friedman wrote:

> This is giving an extremely strange-looking error for the following:
> 
> struct A { int f(); };
> struct B : public A {};
> int B::f() { return 3; }
> 
> <stdin>:3:8: error: out-of-line definition of 'f' does not match any
> declaration in 'B'; did you mean 'f'
> int B::f() { return 3; }
>       ^
>       f
> <stdin>:1:16: note: 'f' declared here
> struct A { int f(); };
>               ^
> 1 error generated.
> 
> -Eli
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits





More information about the cfe-commits mailing list