]> granicus.if.org Git - clang/commitdiff
Replace one FIXME with another. We handle protocols just fine now. The ObjC decl...
authorSteve Naroff <snaroff@apple.com>
Fri, 12 Oct 2007 18:49:25 +0000 (18:49 +0000)
committerSteve Naroff <snaroff@apple.com>
Fri, 12 Oct 2007 18:49:25 +0000 (18:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42923 91177308-0d34-0410-b5e6-96231b3b80d8

Sema/SemaDecl.cpp
clang.xcodeproj/project.pbxproj
test/Sema/check-dup-decl-methods-1.m

index 7e0a51f5c5f4c46c05f975a4cda9ece95b5eac45..002578bbc2f7d9509a6c2501cd7b0260961def59 100644 (file)
@@ -1737,11 +1737,13 @@ bool Sema:: MatchTwoMethodDeclarations(const ObjcMethodDecl *Method,
 void Sema::ActOnAddMethodsToObjcDecl(Scope* S, DeclTy *classDecl,
                                      DeclTy **allMethods, unsigned allNum) {
   Decl *ClassDecl = static_cast<Decl *>(classDecl);
-  
-  // FIXME: Fix this when we can handle methods declared in protocols.
-  // See Parser::ParseObjCAtProtocolDeclaration
+
+  // FIXME: If we don't have a ClassDecl, we have an error. I (snaroff) would
+  // prefer we always pass in a decl. If the decl has an error, isInvalidDecl()
+  // should be true.
   if (!ClassDecl)
     return;
+  
   llvm::SmallVector<ObjcMethodDecl*, 32> insMethods;
   llvm::SmallVector<ObjcMethodDecl*, 16> clsMethods;
   
index 75d938806b0068e9faf478a9935977559b88f772..b88c381faa0b21298a15082c3f3667bb0e3dacc7 100644 (file)
                08FB7793FE84155DC02AAC07 /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */;
-                       compatibilityVersion = "Xcode 2.4";
                        hasScannedForEncodings = 1;
                        mainGroup = 08FB7794FE84155DC02AAC07 /* clang */;
                        projectDirPath = "";
index 1012900e999dafde5b39f47f33b1434dff108fe6..d69c4a71007d195e61398db546fcb91c1bbd9252 100644 (file)
@@ -30,3 +30,9 @@
 + (T**) meth1; // expected-error {{duplicate declaration of method 'meth1'}}
 + (int) foobar;
 @end
+
+@protocol P
+- (int) meth;
+- (int*) meth;
+@end
+