]> granicus.if.org Git - clang/commitdiff
Remove ObjcMethodDecl::getNumMethodParams/getMethodParamDecl, they aren't used/needed.
authorSteve Naroff <snaroff@apple.com>
Tue, 16 Oct 2007 21:36:54 +0000 (21:36 +0000)
committerSteve Naroff <snaroff@apple.com>
Tue, 16 Oct 2007 21:36:54 +0000 (21:36 +0000)
Change ObjcMethodDecl::getMethodType to getResultType, to match FunctionDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43045 91177308-0d34-0410-b5e6-96231b3b80d8

Sema/SemaDecl.cpp
Sema/SemaExpr.cpp
include/clang/AST/DeclObjC.h

index 232c5ba2e2e965bd78e37d4b80d139d49e670d2e..bb100c67ce42558d4f2d83a05f91fcd3215f2e4f 100644 (file)
@@ -1760,8 +1760,8 @@ void Sema::ActOnFields(Scope* S,
 /// 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);
index 082b7182b9b03c1625f3cf1a36d8bf90a2bb7967..896b318d5df2ea7cad4c31188830efbedc5ba75e 100644 (file)
@@ -1944,7 +1944,7 @@ Sema::ExprResult Sema::ActOnClassMessage(
          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 @@ Sema::ExprResult Sema::ActOnInstanceMessage(
            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 @@ Sema::ExprResult Sema::ActOnInstanceMessage(
            SourceRange(lbrac, rbrac));
       returnType = GetObjcIdType();
     } else {
-      returnType = Method->getMethodType();
+      returnType = Method->getResultType();
     }
   }
   Expr **ArgExprs = reinterpret_cast<Expr **>(Args);
index 9df6a430679f6967ac517c42a4df011cfd2d6b44..bbab58a324fba5f5d209c227c9165050494178ba 100644 (file)
@@ -231,14 +231,10 @@ public:
       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 #");