From 66783caa67fd947787a0656fa642ddb4e770f074 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 1 May 2008 15:55:24 +0000 Subject: [PATCH] Added comments to ObjCMessageExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50525 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/Expr.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h index 8a25832874..df0ea77267 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -1538,6 +1538,9 @@ public: delete [] SubExprs; } + /// getReceiver - Returns the receiver of the message expression. + /// This can be NULL if the message is for instance methods. For + /// instance methods, use getClassName. const Expr *getReceiver() const { return SubExprs[RECEIVER]; } Expr *getReceiver() { return SubExprs[RECEIVER]; } @@ -1546,13 +1549,15 @@ public: const ObjCMethodDecl *getMethodDecl() const { return MethodProto; } ObjCMethodDecl *getMethodDecl() { return MethodProto; } + /// getClassName - For instance methods, this returns the invoked class, + /// and returns NULL otherwise. For regular methods, use getReceiver. const IdentifierInfo *getClassName() const { return ClassName; } IdentifierInfo *getClassName() { return ClassName; } /// getNumArgs - Return the number of actual arguments to this call. unsigned getNumArgs() const { return NumArgs; } -/// getArg - Return the specified argument. + /// getArg - Return the specified argument. Expr *getArg(unsigned Arg) { assert(Arg < NumArgs && "Arg access out of range!"); return SubExprs[Arg+ARGS_START]; -- 2.40.0