[cfe-commits] r43045 - in /cfe/trunk: Sema/SemaDecl.cpp Sema/SemaExpr.cpp include/clang/AST/DeclObjC.h

Steve Naroff snaroff at apple.com
Tue Oct 16 14:36:55 PDT 2007


Author: snaroff
Date: Tue Oct 16 16:36:54 2007
New Revision: 43045

URL: http://llvm.org/viewvc/llvm-project?rev=43045&view=rev
Log:

Remove ObjcMethodDecl::getNumMethodParams/getMethodParamDecl, they aren't used/needed.
Change ObjcMethodDecl::getMethodType to getResultType, to match FunctionDecl.


Modified:
    cfe/trunk/Sema/SemaDecl.cpp
    cfe/trunk/Sema/SemaExpr.cpp
    cfe/trunk/include/clang/AST/DeclObjC.h

Modified: cfe/trunk/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaDecl.cpp?rev=43045&r1=43044&r2=43045&view=diff

==============================================================================
--- cfe/trunk/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/Sema/SemaDecl.cpp Tue Oct 16 16:36:54 2007
@@ -1760,8 +1760,8 @@
 /// TODO: Handle protocol list; such as id<p1,p2> in type comparisons
 bool Sema:: MatchTwoMethodDeclarations(const ObjcMethodDecl *Method, 
                                        const ObjcMethodDecl *PrevMethod) {
-  if (Method->getMethodType().getCanonicalType() !=
-      PrevMethod->getMethodType().getCanonicalType())
+  if (Method->getResultType().getCanonicalType() !=
+      PrevMethod->getResultType().getCanonicalType())
     return false;
   for (int i = 0; i < Method->getNumParams(); i++) {
     ParmVarDecl *ParamDecl = Method->getParamDecl(i);

Modified: cfe/trunk/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaExpr.cpp?rev=43045&r1=43044&r2=43045&view=diff

==============================================================================
--- cfe/trunk/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/Sema/SemaExpr.cpp Tue Oct 16 16:36:54 2007
@@ -1944,7 +1944,7 @@
          SourceRange(lbrac, rbrac));
     returnType = GetObjcIdType();
   } else {
-    returnType = Method->getMethodType();
+    returnType = Method->getResultType();
   }
   // Expr *RExpr = global reference to the class symbol...
   Expr **ArgExprs = reinterpret_cast<Expr **>(Args);
@@ -1972,7 +1972,7 @@
            SourceRange(lbrac, rbrac));
       returnType = GetObjcIdType();
     } else {
-      returnType = Method->getMethodType();
+      returnType = Method->getResultType();
     }
   } else {
     // FIXME (snaroff): checking in this code from Patrick. Needs to be
@@ -1995,7 +1995,7 @@
            SourceRange(lbrac, rbrac));
       returnType = GetObjcIdType();
     } else {
-      returnType = Method->getMethodType();
+      returnType = Method->getResultType();
     }
   }
   Expr **ArgExprs = reinterpret_cast<Expr **>(Args);

Modified: cfe/trunk/include/clang/AST/DeclObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=43045&r1=43044&r2=43045&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/DeclObjC.h (original)
+++ cfe/trunk/include/clang/AST/DeclObjC.h Tue Oct 16 16:36:54 2007
@@ -231,14 +231,10 @@
       ParamInfo(paramInfo), NumMethodParams(numParams),
       MethodAttrs(M) {}
   virtual ~ObjcMethodDecl();
-  Selector getSelector() const { return SelName; }
-  QualType getMethodType() const { return MethodDeclType; }
-  unsigned getNumMethodParams() const { return NumMethodParams; }
-  ParmVarDecl *getMethodParamDecl(unsigned i) {
-    assert(i < getNumMethodParams() && "Illegal param #");
-    return ParamInfo[i];
-  }
   
+  Selector getSelector() const { return SelName; }
+  QualType getResultType() const { return MethodDeclType; }
+
   int getNumParams() const { return NumMethodParams; }
   ParmVarDecl *getParamDecl(int i) const {
     assert(i < getNumParams() && "Illegal param #");





More information about the cfe-commits mailing list