diff options
author | Steve Naroff <snaroff@apple.com> | 2009-04-13 17:58:46 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-04-13 17:58:46 +0000 |
commit | 42959b266019040c9fa20fa5a4877f60fea01d71 (patch) | |
tree | eb0645a1fbb987ac076fafe789208e6472dc086a /clang/lib/Sema/SemaDeclObjC.cpp | |
parent | 2cba6be4993c0ef09afe01d5aef809d43527858c (diff) | |
download | bcm5719-llvm-42959b266019040c9fa20fa5a4877f60fea01d71.tar.gz bcm5719-llvm-42959b266019040c9fa20fa5a4877f60fea01d71.zip |
Change diagnostic as a result of researching <rdar://problem/6779809> missing interface name in "error: cannot declare variable inside a class, protocol or category ''.
Since ObjC 2.0 class "extensions" have a null name, the diagnostic above is actually "correct". Nevertheless, it is confusing. Decided to remove the name entirely (from my perspective, it didn't add any value). Also simplified the text of the diagnostic a bit.
llvm-svn: 68967
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index 49433b5b7b0..cf782caf5c0 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -1358,8 +1358,7 @@ void Sema::ActOnAtEnd(SourceLocation AtEndLoc, DeclPtrTy classDecl, if (VarDecl *VDecl = dyn_cast<VarDecl>(*I)) { if (VDecl->getStorageClass() != VarDecl::Extern && VDecl->getStorageClass() != VarDecl::PrivateExtern) - Diag(VDecl->getLocation(), diag::err_objc_var_decl_inclass) - << cast<NamedDecl>(ClassDecl)->getDeclName(); + Diag(VDecl->getLocation(), diag::err_objc_var_decl_inclass); } } } |