Change the formal type of subscript declarations to always

pass the index as a separate argument.  This makes it much
easier to work with these things generically.

Swift SVN r2616
This commit is contained in:
John McCall
2012-08-13 09:02:37 +00:00
parent 2ae8e8737c
commit 88e03293cc
6 changed files with 121 additions and 46 deletions

View File

@@ -1114,7 +1114,11 @@ public:
/// isGetterOrSetter - Determine whether this is a getter or a setter vs.
/// a normal function.
bool isGetterOrSetter() const { return GetOrSetDecl.getPointer() != 0; }
bool isGetterOrSetter() const { return getGetterOrSetterDecl() != 0; }
/// getGetterOrSetterDecl - Return the declaration for which this function
/// is a getter or setter, if it is one.
Decl *getGetterOrSetterDecl() const { return GetOrSetDecl.getPointer(); }
// Implement isa/cast/dyncast/etc.
static bool classof(const Decl *D) { return D->getKind() == DeclKind::Func; }