Add ObjCClassDecl::getSourceRange().

llvm-svn: 89179
This commit is contained in:
Ted Kremenek 2009-11-18 01:26:56 +00:00
parent dfd8daaf61
commit 49939c2914
2 changed files with 8 additions and 0 deletions

View File

@ -744,6 +744,8 @@ public:
ObjCInterfaceDecl *const *Elts = 0,
const SourceLocation *Locs = 0,
unsigned nElts = 0);
virtual SourceRange getSourceRange() const;
typedef const ObjCClassRef* iterator;
iterator begin() const { return ForwardDecls; }

View File

@ -614,6 +614,12 @@ void ObjCClassDecl::Destroy(ASTContext &C) {
Decl::Destroy(C);
}
SourceRange ObjCClassDecl::getSourceRange() const {
// FIXME: We should include the semicolon
assert(NumDecls);
return SourceRange(getLocation(), ForwardDecls[NumDecls-1].getLocation());
}
//===----------------------------------------------------------------------===//
// ObjCForwardProtocolDecl
//===----------------------------------------------------------------------===//