[cfe-dev] [cfe-commits] r43995 - in /cfe/trunk: AST/Decl.cpp Driver/RewriteTest.cpp Parse/ParseObjc.cpp Parse/Parser.cpp Sema/Sema.h Sema/SemaDecl.cpp include/clang/AST/DeclObjC.h include/clang/Parse/Action.h include/clang/Parse/Parser.h test/Sema/message.

Keith Bauer onesadcookie at gmail.com
Mon Nov 12 01:29:41 PST 2007


On Nov 12, 2007 6:19 AM, Steve Naroff <snaroff at apple.com> wrote:
> Author: snaroff
> Date: Sun Nov 11 11:19:15 2007
> New Revision: 43995
>
> URL: http://llvm.org/viewvc/llvm-project?rev=43995&view=rev
> Log:
>
> This is the last 5% of the solution to teaching Sema::ActOnInstanceMessage() about private methods (r43989).
>
> While the diff is large, the idea is very simple. When we parse method definitions (in an @implementation), we need to add them incrementally (rather than wait until the @end).

This fixes a very large number of the erroneous errors in my ObjC
code.  By far the largest category of remaining errors is that field
names are not known in instance method implementations:

CookieJar:~/Desktop keith$ cat > test.m
@interface Foo
{
    int i;
}
- (void)foo;
@end
@implementation Foo
- (void)foo
{
    i = 3;
}
@end
CookieJar:~/Desktop keith$ gcc -Wall -W -fsyntax-only test.m
CookieJar:~/Desktop keith$ clang -fsyntax-only test.m
test.m:10:5: error: use of undeclared identifier 'i'
    i = 3;
    ^
1 diagnostic generated.

I assume this is known ;)

-Keith



More information about the cfe-dev mailing list