diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-01-03 18:01:57 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-01-03 18:01:57 +0000 |
commit | 35b0bac8c51afaa9afe168d9f3f13a6da846bc63 (patch) | |
tree | effe30e9e3a688899966fd41471531d593a1af69 /clang/lib/Sema/SemaExprObjC.cpp | |
parent | 48218e42cd78e85badedd7f36ea39c730314281e (diff) | |
download | bcm5719-llvm-35b0bac8c51afaa9afe168d9f3f13a6da846bc63.tar.gz bcm5719-llvm-35b0bac8c51afaa9afe168d9f3f13a6da846bc63.zip |
Implement typo correction for a variety of Objective-C-specific
constructs:
- Instance variable lookup ("foo->ivar" and, in instance methods, "ivar")
- Property name lookup ("foo.prop")
- Superclasses
- Various places where a class name is required
- Protocol names (e.g., id<proto>)
This seems to cover many of the common places where typos could occur.
llvm-svn: 92449
Diffstat (limited to 'clang/lib/Sema/SemaExprObjC.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExprObjC.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp index 2e31e476453..85889fa5d6d 100644 --- a/clang/lib/Sema/SemaExprObjC.cpp +++ b/clang/lib/Sema/SemaExprObjC.cpp @@ -287,7 +287,8 @@ Action::OwningExprResult Sema::ActOnClassPropertyRefExpr( SourceLocation &receiverNameLoc, SourceLocation &propertyNameLoc) { - ObjCInterfaceDecl *IFace = getObjCInterfaceDecl(&receiverName); + IdentifierInfo *receiverNamePtr = &receiverName; + ObjCInterfaceDecl *IFace = getObjCInterfaceDecl(receiverNamePtr); // Search for a declared property first. @@ -400,7 +401,7 @@ Sema::ExprResult Sema::ActOnClassMessage( return Diag(receiverLoc, diag::err_undeclared_var_use) << receiverName; } } else - ClassDecl = getObjCInterfaceDecl(receiverName); + ClassDecl = getObjCInterfaceDecl(receiverName, receiverLoc); // The following code allows for the following GCC-ism: // |