]> granicus.if.org Git - clang/commitdiff
objc - minor comment fix up and cleanup.
authorFariborz Jahanian <fjahanian@apple.com>
Mon, 22 Aug 2011 18:34:22 +0000 (18:34 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Mon, 22 Aug 2011 18:34:22 +0000 (18:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138253 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclObjC.cpp
lib/Sema/SemaObjCProperty.cpp

index 35e32d4ad9d350add0ecd5a63d1e4140a1f558ab..92fe9ec6eeee02d64499e6d248c9e53e956eec4b 100644 (file)
@@ -2665,8 +2665,8 @@ Decl *Sema::ActOnMethodDeclaration(
 bool Sema::CheckObjCDeclScope(Decl *D) {
   if (isa<TranslationUnitDecl>(CurContext->getRedeclContext()))
     return false;
-  // Following is also an error. But it is caused my a missing @end
-  // and diagnostic is issued elsewere.
+  // Following is also an error. But it is caused by a missing @end
+  // and diagnostic is issued elsewhere.
   if (isa<ObjCContainerDecl>(CurContext->getRedeclContext())) {
     return false;
   }
index ddb7eebd864a1db3bd30e137396e9daa74dd89c8..a5fb31afafc66597fbabfa104f9c5d5ed3fa8166 100644 (file)
@@ -144,7 +144,7 @@ Sema::HandlePropertyInClassExtension(Scope *S,
                                      bool *isOverridingProperty,
                                      TypeSourceInfo *T,
                                      tok::ObjCKeywordKind MethodImplKind) {
-  ObjCCategoryDecl *CDecl = dyn_cast<ObjCCategoryDecl>(CurContext);
+  ObjCCategoryDecl *CDecl = cast<ObjCCategoryDecl>(CurContext);
   // Diagnose if this property is already in continuation class.
   DeclContext *DC = CurContext;
   IdentifierInfo *PropertyId = FD.D.getIdentifier();